accessible/tests/mochitest/tree/test_map.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/tree/test_map.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,83 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>HTML map accessible tree 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 +
    1.14 +  <script type="application/javascript"
    1.15 +          src="../common.js"></script>
    1.16 +  <script type="application/javascript"
    1.17 +          src="../role.js"></script>
    1.18 +
    1.19 +  <script type="application/javascript">
    1.20 +    function doTest()
    1.21 +    {
    1.22 +      // map used as imagemap, not accessible
    1.23 +      var accTree =
    1.24 +        { SECTION: [ ] };
    1.25 +
    1.26 +      testAccessibleTree("imagemapcontainer", accTree);
    1.27 +
    1.28 +      // map group.  Imagemaps are inlines by default, so TEXT_CONTAINER.
    1.29 +      accTree =
    1.30 +        { TEXT_CONTAINER: [
    1.31 +          { PARAGRAPH: [
    1.32 +            { TEXT_LEAF: [ ] },
    1.33 +            { LINK: [
    1.34 +              { TEXT_LEAF: [ ] }
    1.35 +            ] },
    1.36 +            { TEXT_LEAF: [ ] },
    1.37 +            { LINK: [
    1.38 +              { TEXT_LEAF: [ ] }
    1.39 +            ] },
    1.40 +            { TEXT_LEAF: [ ] }
    1.41 +          ] }
    1.42 +        ] };
    1.43 +
    1.44 +      testAccessibleTree("mapgroup", accTree);
    1.45 +
    1.46 +      SimpleTest.finish();
    1.47 +    }
    1.48 +
    1.49 +    SimpleTest.waitForExplicitFinish();
    1.50 +    addA11yLoadEvent(doTest);
    1.51 +  </script>
    1.52 +</head>
    1.53 +<body>
    1.54 +
    1.55 +  <a target="_blank"
    1.56 +     title="Map used for grouping is not accessible under certain circumstances"
    1.57 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=627718">
    1.58 +    Mozilla Bug 627718
    1.59 +  </a>
    1.60 +  <p id="display"></p>
    1.61 +  <div id="content" style="display: none"></div>
    1.62 +  <pre id="test">
    1.63 +  </pre>
    1.64 +
    1.65 +  <div id="imagemapcontainer">
    1.66 +    <map name="atoz_map">
    1.67 +      <area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#b"
    1.68 +            coords="17,0,30,14" alt="b" shape="rect">
    1.69 +      <area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#a"
    1.70 +            coords="0,0,13,14" alt="a" shape="rect">
    1.71 +    </map>
    1.72 +  </div>
    1.73 +
    1.74 +  <img id="imgmap" width="447" height="15"
    1.75 +       usemap="#atoz_map"
    1.76 +       src="../letters.gif">
    1.77 +
    1.78 +  <map id="mapgroup" title="Navigation Bar" name="mapgroup">
    1.79 +    <p>
    1.80 +      [<a href="#how">Bypass navigation bar</a>]
    1.81 +      [<a href="home.html">Home</a>]
    1.82 +    </p>
    1.83 +  </map>
    1.84 +
    1.85 +</body>
    1.86 +</html>

mercurial