accessible/tests/mochitest/tree/test_gencontent.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/tree/test_gencontent.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,71 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +
     1.7 +<head>
     1.8 +  <title>Generated content tests</title>
     1.9 +  <link rel="stylesheet" type="text/css"
    1.10 +        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
    1.11 +
    1.12 +  <style>
    1.13 +    .gentext:before {
    1.14 +      content: "START"
    1.15 +    }
    1.16 +    .gentext:after {
    1.17 +      content: "END"
    1.18 +    }
    1.19 +  </style>
    1.20 +
    1.21 +  <script type="application/javascript"
    1.22 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    1.23 +
    1.24 +  <script type="application/javascript"
    1.25 +          src="../common.js"></script>
    1.26 +  <script type="application/javascript"
    1.27 +          src="../role.js"></script>
    1.28 +
    1.29 +  <script type="application/javascript">
    1.30 +    function doTest()
    1.31 +    {
    1.32 +      // :before and :after pseudo styles
    1.33 +      var accTree = {
    1.34 +        role: ROLE_SECTION,
    1.35 +        children: [
    1.36 +          {
    1.37 +            role: ROLE_STATICTEXT,
    1.38 +            name: "START"
    1.39 +          },
    1.40 +          {
    1.41 +            role: ROLE_TEXT_LEAF,
    1.42 +            name: "MIDDLE"
    1.43 +          },
    1.44 +          {
    1.45 +            role: ROLE_STATICTEXT,
    1.46 +            name: "END"
    1.47 +          }
    1.48 +        ]
    1.49 +      };
    1.50 +
    1.51 +      testAccessibleTree("gentext", accTree);
    1.52 +
    1.53 +      SimpleTest.finish();
    1.54 +    }
    1.55 +
    1.56 +    SimpleTest.waitForExplicitFinish();
    1.57 +    addA11yLoadEvent(doTest);
    1.58 +  </script>
    1.59 +</head>
    1.60 +<body>
    1.61 +
    1.62 +  <a target="_blank"
    1.63 +     title="Clean up our tree walker"
    1.64 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=530081">
    1.65 +    Mozilla Bug 530081
    1.66 +  </a>
    1.67 +  <p id="display"></p>
    1.68 +  <div id="content" style="display: none"></div>
    1.69 +  <pre id="test">
    1.70 +  </pre>
    1.71 +
    1.72 +  <div class="gentext" id="gentext">MIDDLE</div>
    1.73 +</body>
    1.74 +</html>

mercurial