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

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

mercurial