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();
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");
30 testRelation(
"l2i2", RELATION_NODE_CHILD_OF,
"l2");
35 SimpleTest.waitForExplicitFinish();
36 addA11yLoadEvent(doTests);
42 <div id=
"content" style=
"display: none"></div>
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>
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>
55 <div id=
"l2trash"></div>