no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / accessible / tests / mochitest / treeupdate / test_ariadialog.html
blob0b7f4bbb56e8673b1c34e299e6f083ae365f9daa
1 <!DOCTYPE html>
2 <html>
4 <head>
5 <title>Table creation in ARIA dialog test</title>
7 <link rel="stylesheet" type="text/css"
8 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
10 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
12 <script type="application/javascript"
13 src="../common.js"></script>
14 <script type="application/javascript"
15 src="../role.js"></script>
16 <script type="application/javascript"
17 src="../events.js"></script>
19 <script type="application/javascript">
21 // //////////////////////////////////////////////////////////////////////////
22 // Invokers
24 function showARIADialog(aID) {
25 this.node = getNode(aID);
27 this.eventSeq = [
28 new invokerChecker(EVENT_SHOW, this.node),
31 this.invoke = function showARIADialog_invoke() {
32 getNode("dialog").style.display = "block";
33 getNode("table").style.visibility = "visible";
34 getNode("a").textContent = "link";
35 getNode("input").value = "hello";
36 getNode("input").focus();
39 this.finalCheck = function showARIADialog_finalCheck() {
40 var tree = {
41 role: ROLE_DIALOG,
42 children: [
44 role: ROLE_PUSHBUTTON,
45 children: [ { role: ROLE_TEXT_LEAF } ],
48 role: ROLE_ENTRY,
52 testAccessibleTree(aID, tree);
55 this.getID = function showARIADialog_getID() {
56 return "show ARIA dialog";
60 // //////////////////////////////////////////////////////////////////////////
61 // Test
63 // gA11yEventDumpID = "eventdump"; // debug stuff
64 // gA11yEventDumpToConsole = true;
66 var gQueue = null;
68 function doTest() {
69 // enableLogging("tree");
70 gQueue = new eventQueue();
72 // make the accessible an inaccessible
73 gQueue.push(new showARIADialog("dialog"));
75 gQueue.invoke(); // SimpleTest.finish() will be called in the end
78 SimpleTest.waitForExplicitFinish();
79 addA11yLoadEvent(doTest);
80 </script>
81 </head>
82 <body>
84 <a target="_blank"
85 title="Rework accessible tree update code"
86 href="https://bugzilla.mozilla.org/show_bug.cgi?id=570275">
87 Mozilla Bug 570275
88 </a>
90 <p id="display"></p>
91 <div id="content" style="display: none"></div>
92 <pre id="test">
93 </pre>
95 <div id="dialog" role="dialog" style="display: none;">
96 <table id="table" role="presentation"
97 style="display: block; position: absolute; top: 88px; left: 312.5px; z-index: 10010; visibility: hidden;">
98 <tbody>
99 <tr>
100 <td role="presentation">
101 <div role="presentation">
102 <a id="a" role="button">text</a>
103 </div>
104 <input id="input">
105 </td>
106 </tr>
107 </tbody>
108 </table>
109 </div>
111 <div id="eventdump"></div>
112 </body>
113 </html>