no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / accessible / tests / mochitest / treeupdate / test_table.html
blob50fac91757913e19f572066622c27b964e986f75
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Table update tests</title>
5 <link rel="stylesheet" type="text/css"
6 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
8 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <script type="application/javascript"
11 src="../common.js"></script>
12 <script type="application/javascript"
13 src="../role.js"></script>
14 <script type="application/javascript"
15 src="../events.js"></script>
17 <script type="application/javascript">
19 function appendCaption(aTableID) {
20 this.invoke = function appendCaption_invoke() {
21 // append a caption, it should appear as a first element in the
22 // accessible tree.
23 var caption = document.createElement("caption");
24 caption.textContent = "table caption";
25 getNode(aTableID).appendChild(caption);
28 this.eventSeq = [
29 new invokerChecker(EVENT_REORDER, aTableID),
32 this.finalCheck = function appendCaption_finalCheck() {
33 var tree =
34 { TABLE: [
35 { CAPTION: [
36 { TEXT_LEAF: [] },
37 ] },
38 { ROW: [
39 { CELL: [ {TEXT_LEAF: [] }]},
40 { CELL: [ {TEXT_LEAF: [] }]},
41 ] },
42 ] };
43 testAccessibleTree(aTableID, tree);
46 this.getID = function appendCaption_getID() {
47 return "append caption";
51 function doTest() {
52 const gQueue = new eventQueue();
53 gQueue.push(new appendCaption("table"));
54 gQueue.invoke(); // Will call SimpleTest.finish();
57 SimpleTest.waitForExplicitFinish();
58 addA11yLoadEvent(doTest);
59 </script>
60 </head>
61 <body>
62 <p id="display"></p>
63 <div id="content" style="display: none"></div>
64 <pre id="test">
65 </pre>
67 <table id="table">
68 <tr>
69 <td>cell1</td>
70 <td>cell2</td>
71 </tr>
72 </table>
73 </body>
74 </html>