accessible/tests/mochitest/tree/test_gencontent.html

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 <!DOCTYPE html>
     2 <html>
     4 <head>
     5   <title>Generated content tests</title>
     6   <link rel="stylesheet" type="text/css"
     7         href="chrome://mochikit/content/tests/SimpleTest/test.css" />
     9   <style>
    10     .gentext:before {
    11       content: "START"
    12     }
    13     .gentext:after {
    14       content: "END"
    15     }
    16   </style>
    18   <script type="application/javascript"
    19           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    21   <script type="application/javascript"
    22           src="../common.js"></script>
    23   <script type="application/javascript"
    24           src="../role.js"></script>
    26   <script type="application/javascript">
    27     function doTest()
    28     {
    29       // :before and :after pseudo styles
    30       var accTree = {
    31         role: ROLE_SECTION,
    32         children: [
    33           {
    34             role: ROLE_STATICTEXT,
    35             name: "START"
    36           },
    37           {
    38             role: ROLE_TEXT_LEAF,
    39             name: "MIDDLE"
    40           },
    41           {
    42             role: ROLE_STATICTEXT,
    43             name: "END"
    44           }
    45         ]
    46       };
    48       testAccessibleTree("gentext", accTree);
    50       SimpleTest.finish();
    51     }
    53     SimpleTest.waitForExplicitFinish();
    54     addA11yLoadEvent(doTest);
    55   </script>
    56 </head>
    57 <body>
    59   <a target="_blank"
    60      title="Clean up our tree walker"
    61      href="https://bugzilla.mozilla.org/show_bug.cgi?id=530081">
    62     Mozilla Bug 530081
    63   </a>
    64   <p id="display"></p>
    65   <div id="content" style="display: none"></div>
    66   <pre id="test">
    67   </pre>
    69   <div class="gentext" id="gentext">MIDDLE</div>
    70 </body>
    71 </html>

mercurial