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