accessible/tests/mochitest/tree/test_img.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/tree/test_img.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,88 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>HTML img tests</title>
     1.8 +  <link rel="stylesheet" type="text/css"
     1.9 +        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
    1.10 +
    1.11 +  <script type="application/javascript"
    1.12 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    1.13 +  <script type="application/javascript"
    1.14 +          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
    1.15 +
    1.16 +  <script type="application/javascript"
    1.17 +          src="../common.js"></script>
    1.18 +  <script type="application/javascript"
    1.19 +          src="../role.js"></script>
    1.20 +  <script type="application/javascript"
    1.21 +          src="../events.js"></script>
    1.22 +
    1.23 +  <script type="application/javascript">
    1.24 +    //gA11yEventDumpToConsole = true;
    1.25 +    function doPreTest()
    1.26 +    {
    1.27 +      waitForImageMap("imgmap", doTest);
    1.28 +    }
    1.29 +
    1.30 +    function doTest()
    1.31 +    {
    1.32 +      // image map
    1.33 +      var accTree = {
    1.34 +        role: ROLE_IMAGE_MAP,
    1.35 +        children: [
    1.36 +          {
    1.37 +            role: ROLE_LINK,
    1.38 +            children: []
    1.39 +          },
    1.40 +          {
    1.41 +            role: ROLE_LINK,
    1.42 +            children: []
    1.43 +          }
    1.44 +        ]
    1.45 +      };
    1.46 +
    1.47 +      testAccessibleTree("imgmap", accTree);
    1.48 +
    1.49 +      // img
    1.50 +      accTree = {
    1.51 +        role: ROLE_GRAPHIC,
    1.52 +        children: []
    1.53 +      };
    1.54 +
    1.55 +      testAccessibleTree("img", accTree);
    1.56 +
    1.57 +      SimpleTest.finish();
    1.58 +    }
    1.59 +
    1.60 +    SimpleTest.waitForExplicitFinish();
    1.61 +    addA11yLoadEvent(doPreTest);
    1.62 +  </script>
    1.63 +
    1.64 +</head>
    1.65 +<body>
    1.66 +
    1.67 +  <a target="_blank"
    1.68 +     title="Fix O(n^2) access to all the children of a container"
    1.69 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=342045">
    1.70 +    Mozilla Bug 342045
    1.71 +  </a>
    1.72 +  <p id="display"></p>
    1.73 +  <div id="content" style="display: none"></div>
    1.74 +  <pre id="test">
    1.75 +  </pre>
    1.76 +
    1.77 +  <map name="atoz_map">
    1.78 +    <area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#b"
    1.79 +          coords="17,0,30,14" alt="b" shape="rect">
    1.80 +    <area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#a"
    1.81 +          coords="0,0,13,14" alt="a" shape="rect">
    1.82 +  </map>
    1.83 +
    1.84 +  <img id="imgmap" width="447" height="15"
    1.85 +       usemap="#atoz_map"
    1.86 +       src="../letters.gif">
    1.87 +
    1.88 +  <img id="img" src="../moz.png">
    1.89 +
    1.90 +</body>
    1.91 +</html>

mercurial