accessible/tests/mochitest/role/test_svg.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/role/test_svg.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,70 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>SVG elements accessible roles</title>
     1.8 +  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
     1.9 +
    1.10 +  <script type="application/javascript"
    1.11 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +
    1.13 +  <script type="application/javascript"
    1.14 +          src="../common.js"></script>
    1.15 +  <script type="application/javascript"
    1.16 +          src="../role.js"></script>
    1.17 +  <script type="application/javascript"
    1.18 +          src="../attributes.js"></script>
    1.19 +
    1.20 +  <script type="application/javascript">
    1.21 +    function doTests()
    1.22 +    {
    1.23 +      testRole("svg", ROLE_DIAGRAM);
    1.24 +      testRole("rect", ROLE_GRAPHIC);
    1.25 +      testRole("circle", ROLE_GRAPHIC);
    1.26 +      testRole("ellipse", ROLE_GRAPHIC);
    1.27 +      testRole("line", ROLE_GRAPHIC);
    1.28 +      testRole("polygon", ROLE_GRAPHIC);
    1.29 +      testRole("polyline", ROLE_GRAPHIC);
    1.30 +      testRole("path", ROLE_GRAPHIC);
    1.31 +      testRole("image", ROLE_GRAPHIC);
    1.32 +
    1.33 +      SimpleTest.finish();
    1.34 +    }
    1.35 +
    1.36 +    SimpleTest.waitForExplicitFinish();
    1.37 +    addA11yLoadEvent(doTests);
    1.38 +  </script>
    1.39 +</head>
    1.40 +<body>
    1.41 +
    1.42 +  <a target="_blank"
    1.43 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=822983"
    1.44 +     title="Map SVG graphic elements to accessibility API">
    1.45 +    Bug 822983
    1.46 +  </a>
    1.47 +
    1.48 +  <p id="display"></p>
    1.49 +  <div id="content" style="display: none"></div>
    1.50 +  <pre id="test">
    1.51 +  </pre>
    1.52 +
    1.53 +  <svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg"
    1.54 +       xmlns:xlink="http://www.w3.org/1999/xlink">
    1.55 +    <rect width="300" height="100" id="rect"
    1.56 +          style="fill:rgb(0,0,255);stroke-width:1;stroke:rgb(0,0,0)"/>
    1.57 +    <circle cx="100" cy="50" r="40" stroke="black" id="circle"
    1.58 +            stroke-width="2" fill="red"/>
    1.59 +    <ellipse cx="300" cy="80" rx="100" ry="50" id="ellipse"
    1.60 +             style="fill:yellow;stroke:purple;stroke-width:2"/>
    1.61 +    <line x1="0" y1="0" x2="200" y2="200" id="line"
    1.62 +          style="stroke:rgb(255,0,0);stroke-width:2"/>
    1.63 +    <polygon points="200,10 250,190 160,210" id="polygon"
    1.64 +             style="fill:lime;stroke:purple;stroke-width:1"/>
    1.65 +    <polyline points="20,20 40,25 60,40 80,120 120,140 200,180" id="polyline"
    1.66 +              style="fill:none;stroke:black;stroke-width:3" />
    1.67 +    <path d="M150 0 L75 200 L225 200 Z" id="path"/>
    1.68 +    <image x1="25" y1="80" width="50" height="20" id="image"
    1.69 +           xlink:href="../moz.png"/>
    1.70 +  </svg>
    1.71 +
    1.72 +</body>
    1.73 +</html>

mercurial