no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / accessible / tests / mochitest / relations / test_groupInfoUpdate.html
blobefca27617c63d66faf3343689f83a3ac87783e93
1 <html>
2 <head>
3 <title>Test accessible relations when AccGroupInfo updated</title>
4 <link rel="stylesheet" type="text/css"
5 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
6 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
8 <script type="application/javascript"
9 src="../common.js"></script>
10 <script type="application/javascript"
11 src="../relations.js"></script>
12 <script type="application/javascript"
13 src="../promisified-events.js"></script>
15 <script type="application/javascript">
16 async function doTests() {
17 info("Testing NODE_CHILD_OF update after DOM removal");
18 testRelation("l1i2", RELATION_NODE_CHILD_OF, "l1i1");
19 let reorder = waitForEvent(EVENT_REORDER, "l1");
20 getNode("l1i1").remove();
21 await reorder;
22 testRelation("l1i2", RELATION_NODE_CHILD_OF, "l1");
24 info("Testing NODE_CHILD_OF update after aria-owns removal");
25 testRelation("l2i2", RELATION_NODE_CHILD_OF, "l2i1");
26 reorder = waitForEvent(EVENT_REORDER, "l2");
27 // Move l2i1 out of l2 using aria-owns.
28 getNode("l2trash").setAttribute("aria-owns", "l2i1");
29 await reorder;
30 testRelation("l2i2", RELATION_NODE_CHILD_OF, "l2");
32 SimpleTest.finish();
35 SimpleTest.waitForExplicitFinish();
36 addA11yLoadEvent(doTests);
37 </script>
38 </head>
40 <body id="body">
41 <p id="display"></p>
42 <div id="content" style="display: none"></div>
43 <pre id="test">
44 </pre>
46 <div id="l1" role="list">
47 <div id="l1i1" role="listitem" aria-level="1">a</div>
48 <div id="l1i2" role="listitem" aria-level="2">b</div>
49 </div>
51 <div id="l2" role="list">
52 <div id="l2i1" role="listitem" aria-level="1">a</div>
53 <div id="l2i2" role="listitem" aria-level="2">b</div>
54 </div>
55 <div id="l2trash"></div>
56 </body>
57 </html>