accessible/tests/mochitest/treeupdate/test_bug852150.xhtml

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 <html xmlns="http://www.w3.org/1999/xhtml">
michael@0 2 <head>
michael@0 3 <title>Canvas subdom mutation</title>
michael@0 4
michael@0 5 <link rel="stylesheet" type="text/css"
michael@0 6 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
michael@0 7
michael@0 8 <script type="application/javascript"
michael@0 9 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
michael@0 10
michael@0 11 <script type="application/javascript"
michael@0 12 src="../common.js"></script>
michael@0 13 <script type="application/javascript"
michael@0 14 src="../role.js"></script>
michael@0 15
michael@0 16 <script>
michael@0 17 <![CDATA[
michael@0 18 function doTest()
michael@0 19 {
michael@0 20 var the_displayNone = getNode("the_displaynone");
michael@0 21 var the_table = getNode("the_table");
michael@0 22 var the_row = getNode("the_row");
michael@0 23 ok(isAccessible(the_table), "table should be accessible");
michael@0 24 the_displayNone.appendChild(the_table);
michael@0 25 ok(!isAccessible(the_table), "table in display none tree shouldn't be accessible");
michael@0 26
michael@0 27 setTimeout(function() {
michael@0 28 document.body.removeChild(the_row);
michael@0 29 // make sure no accessibles have stuck around.
michael@0 30 ok(!isAccessible(the_row), "row shouldn't be accessible");
michael@0 31 ok(!isAccessible(the_table), "table shouldn't be accessible");
michael@0 32 ok(!isAccessible(the_displayNone), "display none things shouldn't be accessible");
michael@0 33 SimpleTest.finish();
michael@0 34 }, 0);
michael@0 35 }
michael@0 36
michael@0 37 SimpleTest.waitForExplicitFinish();
michael@0 38 addA11yLoadEvent(doTest);
michael@0 39 ]]>
michael@0 40 </script>
michael@0 41 </head>
michael@0 42 <body>
michael@0 43
michael@0 44 <a target="_blank"
michael@0 45 title="test accessible removal when reframe root isn't accessible"
michael@0 46 href="https://bugzilla.mozilla.org/show_bug.cgi?id=852150">
michael@0 47 Mozilla Bug 852150
michael@0 48 </a>
michael@0 49
michael@0 50 <p id="display"></p>
michael@0 51 <div id="content" style="display: none"></div>
michael@0 52 <pre id="test">
michael@0 53 </pre>
michael@0 54
michael@0 55 <div id="the_displaynone" style="display: none;"></div>
michael@0 56 <table id="the_table"></table>
michael@0 57 <tr id="the_row"></tr>
michael@0 58 </body>
michael@0 59 </html>

mercurial