no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / accessible / tests / mochitest / treeupdate / test_menu.xhtml
blob44042cc9e7ffba8c34a4e88eeddb1126d5a9b94a
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"?>
6 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
7 title="Accessible XUL menu hierarchy tests">
9 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
11 <script type="application/javascript"
12 src="../common.js" />
13 <script type="application/javascript"
14 src="../role.js" />
15 <script type="application/javascript"
16 src="../events.js" />
18 <script type="application/javascript">
19 <![CDATA[
20 ////////////////////////////////////////////////////////////////////////////
21 // Invokers
23 function openMenu(aID)
25 this.menuNode = getNode(aID);
27 this.eventSeq = [
28 new invokerChecker(EVENT_FOCUS, this.menuNode)
31 this.invoke = function openMenu_invoke()
33 var tree;
34 if (LINUX || SOLARIS) {
35 tree =
36 { PARENT_MENUITEM: [ ] };
38 } else {
39 tree =
40 { PARENT_MENUITEM: [
41 { MENUPOPUP: [ ] }
42 ] };
44 testAccessibleTree(aID, tree);
46 // Show menu.
47 this.menuNode.open = true;
50 this.finalCheck = function openMenu_finalCheck()
52 var tree;
53 if (LINUX || SOLARIS) {
54 tree =
55 { PARENT_MENUITEM: [
56 { MENUITEM: [ ] },
57 { MENUITEM: [ ] }
58 ] };
60 } else {
61 tree =
62 { PARENT_MENUITEM: [
63 { MENUPOPUP: [
64 { MENUITEM: [ ] },
65 { MENUITEM: [ ] }
66 ] }
67 ] };
69 testAccessibleTree(aID, tree);
72 this.getID = function openMenu_getID()
74 return "open menu " + prettyName(aID);
78 ////////////////////////////////////////////////////////////////////////////
79 // Test
81 var gQueue = null;
82 function doTest()
84 gQueue = new eventQueue();
85 gQueue.push(new openMenu("menu"));
86 gQueue.invoke(); // Will call SimpleTest.finish();
89 SimpleTest.waitForExplicitFinish();
90 addA11yLoadEvent(doTest);
91 ]]>
92 </script>
94 <hbox flex="1" style="overflow: auto;">
95 <body xmlns="http://www.w3.org/1999/xhtml">
96 <a target="_blank"
97 href="https://bugzilla.mozilla.org/show_bug.cgi?id=249292"
98 title="Ensure accessible children for toolbarbutton types 'menu'">
99 Mozilla Bug 249292
100 </a>
101 <a target="_blank"
102 href="https://bugzilla.mozilla.org/show_bug.cgi?id=630486"
103 title="Don't force accessible creation for popup children.">
104 Mozilla Bug 630486
105 </a>
106 <br/>
107 <p id="display"></p>
108 <div id="content" style="display: none">
109 </div>
110 <pre id="test">
111 </pre>
112 </body>
114 <vbox flex="1">
115 <menubar>
116 <menu id="menu" label="menu">
117 <menupopup>
118 <menuitem label="menuitem"/>
119 <menuitem label="menuitem"/>
120 </menupopup>
121 </menu>
122 </menubar>
123 </vbox>
124 </hbox>
126 </window>