accessible/tests/mochitest/actions/test_general.xul

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 <?xml version="1.0"?>
michael@0 2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
michael@0 3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
michael@0 4 type="text/css"?>
michael@0 5 <?xml-stylesheet href="../nsIAccessible_name.css"
michael@0 6 type="text/css"?>
michael@0 7
michael@0 8
michael@0 9 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
michael@0 10 title="nsIAccessible actions testing">
michael@0 11
michael@0 12 <script type="application/javascript"
michael@0 13 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
michael@0 14
michael@0 15 <script type="application/javascript"
michael@0 16 src="../common.js" />
michael@0 17 <script type="application/javascript"
michael@0 18 src="../events.js" />
michael@0 19 <script type="application/javascript"
michael@0 20 src="../actions.js" />
michael@0 21
michael@0 22 <script type="application/javascript">
michael@0 23 <![CDATA[
michael@0 24 if (navigator.platform.startsWith("Mac")) {
michael@0 25 SimpleTest.expectAssertions(0, 1);
michael@0 26 } else {
michael@0 27 SimpleTest.expectAssertions(1);
michael@0 28 }
michael@0 29
michael@0 30 function doTest()
michael@0 31 {
michael@0 32 var actionsArray = [
michael@0 33 {
michael@0 34 ID: "menu",
michael@0 35 actionName: "click",
michael@0 36 events: CLICK_EVENTS,
michael@0 37 // Wait for focus event, it guarantees us the submenu tree is created,
michael@0 38 // that's necessary for next test.
michael@0 39 eventSeq: [
michael@0 40 new invokerChecker(EVENT_FOCUS, getNode("menu"))
michael@0 41 ]
michael@0 42 },
michael@0 43 {
michael@0 44 ID: "submenu",
michael@0 45 actionName: "click",
michael@0 46 events: CLICK_EVENTS
michael@0 47 },
michael@0 48 {
michael@0 49 ID: "menuitem",
michael@0 50 actionName: "click",
michael@0 51 events: XUL_EVENTS
michael@0 52 },
michael@0 53 {
michael@0 54 ID: "button",
michael@0 55 actionName: "press",
michael@0 56 events: XUL_EVENTS
michael@0 57 },
michael@0 58 {
michael@0 59 ID: "buttonmenu",
michael@0 60 actionName: "press",
michael@0 61 events: CLICK_EVENTS
michael@0 62 },
michael@0 63 {
michael@0 64 ID: "labelWithPopup",
michael@0 65 actionName: "click",
michael@0 66 events: CLICK_EVENTS
michael@0 67 }/*, // XXX: bug 490288
michael@0 68 {
michael@0 69 ID: "buttonmenu_item",
michael@0 70 actionName: "click",
michael@0 71 events: CLICK_EVENTS
michael@0 72 }*/
michael@0 73 ];
michael@0 74
michael@0 75 testActions(actionsArray);
michael@0 76 }
michael@0 77
michael@0 78 SimpleTest.waitForExplicitFinish();
michael@0 79 addA11yLoadEvent(doTest);
michael@0 80 ]]>
michael@0 81 </script>
michael@0 82
michael@0 83 <hbox flex="1" style="overflow: auto;">
michael@0 84 <body xmlns="http://www.w3.org/1999/xhtml">
michael@0 85 <a target="_blank"
michael@0 86 href="https://bugzilla.mozilla.org/show_bug.cgi?id=410765"
michael@0 87 title="nsIAccessible actions testing">
michael@0 88 Mozilla Bug 410765
michael@0 89 </a>
michael@0 90 <a target="_blank"
michael@0 91 href="https://bugzilla.mozilla.org/show_bug.cgi?id=504252"
michael@0 92 title="Expose STATE_HASPOPUP on XUL elements that have an @popup attribute">
michael@0 93 Mozilla Bug 504252
michael@0 94 </a><br/>
michael@0 95 <p id="display"></p>
michael@0 96 <div id="content" style="display: none">
michael@0 97 </div>
michael@0 98 <pre id="test">
michael@0 99 </pre>
michael@0 100 </body>
michael@0 101
michael@0 102 <vbox flex="1">
michael@0 103 <menubar>
michael@0 104 <menu label="menu" id="menu">
michael@0 105 <menupopup>
michael@0 106 <menuitem label="menu item" id="menuitem"/>
michael@0 107 <menu label="submenu" id="submenu">
michael@0 108 <menupopup>
michael@0 109 <menuitem label="menu item"/>
michael@0 110 </menupopup>
michael@0 111 </menu>
michael@0 112 </menupopup>
michael@0 113 </menu>
michael@0 114 </menubar>
michael@0 115
michael@0 116 <button label="button" id="button"/>
michael@0 117
michael@0 118 <button type="menu" id="buttonmenu" label="button">
michael@0 119 <menupopup>
michael@0 120 <menuitem label="item1" id="buttonmenu_item"/>
michael@0 121 <menuitem label="item1"/>
michael@0 122 </menupopup>
michael@0 123 </button>
michael@0 124
michael@0 125 <label id="labelWithPopup" value="file name"
michael@0 126 popup="fileContext"
michael@0 127 tabindex="0"/>
michael@0 128 </vbox>
michael@0 129 </hbox>
michael@0 130 </window>
michael@0 131

mercurial