accessible/tests/mochitest/tree/test_dockids.html

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4   <title>Test document hierarchy</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>
    15   <script type="application/javascript"
    16           src="../states.js"></script>
    18   <script type="application/javascript">
    19   function doTest()
    20   {
    21     var tree =
    22      { DOCUMENT: [
    23        { PARAGRAPH: [ // head
    24          { PARAGRAPH: [ // link
    25            { STATICTEXT: [] }, // generated content
    26            { STATICTEXT: [] } // generated content
    27          ] }
    28        ] },
    29        { TEXT_LEAF: [ ] }, // body text
    30        { ENTRY: [ ] }, // input under document element
    31        { PARAGRAPH: [ // link under document element
    32          { TEXT_LEAF: [ ] }, // link content
    33          { STATICTEXT: [ ] }, // generated content
    34          { STATICTEXT: [ ] } // generated content
    35        ] },
    36        { LINK: [ // anchor under document element
    37          { TEXT_LEAF: [ ] } // anchor content
    38        ] },
    39      ] };
    40     testAccessibleTree(getNode("iframe").contentDocument, tree);
    42     SimpleTest.finish();
    43   }
    45   SimpleTest.waitForExplicitFinish();
    46   addA11yLoadEvent(doTest);
    47   </script>
    48 </head>
    50 <body>
    51   <a target="_blank"
    52      href="https://bugzilla.mozilla.org/show_bug.cgi?id=608887"
    53      title="Elements appended outside the body aren't accessible">
    54     Mozilla Bug 608887
    55   </a>
    56   <p id="display"></p>
    57   <div id="content" style="display: none"></div>
    58   <pre id="test">
    59   </pre>
    61   <iframe src="dockids.html" id="iframe"></iframe>
    62 </body>
    63 </html>

mercurial