accessible/tests/mochitest/tree/test_media.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/tree/test_media.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,84 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=483573
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>HTML5 audio/video tests</title>
    1.11 +  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
    1.12 +
    1.13 +  <script type="application/javascript"
    1.14 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.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="../states.js"></script>
    1.22 +
    1.23 +  <script type="application/javascript">
    1.24 +
    1.25 +    function doTest()
    1.26 +    {
    1.27 +      //////////////////////////////////////////////////////////////////////////
    1.28 +      // test the accessible tree
    1.29 +
    1.30 +      var accTree = {
    1.31 +        role: ROLE_GROUPING,
    1.32 +        children: [
    1.33 +          { // start/stop button
    1.34 +            role: ROLE_PUSHBUTTON,
    1.35 +            name: "Play",
    1.36 +            children: []
    1.37 +          },
    1.38 +          { // buffer bar
    1.39 +            role: ROLE_PROGRESSBAR,
    1.40 +            children: []
    1.41 +          },
    1.42 +          { // progress bar
    1.43 +            role: ROLE_PROGRESSBAR,
    1.44 +            children: []
    1.45 +          },
    1.46 +          { // slider of progress bar
    1.47 +            role: ROLE_SLIDER,
    1.48 +            //name: "0:00 of 0:02 elapsed",
    1.49 +            children: []
    1.50 +          },
    1.51 +          { // mute button
    1.52 +            role: ROLE_PUSHBUTTON,
    1.53 +            name: "Mute",
    1.54 +            children: []
    1.55 +          },
    1.56 +          { // slider of volume bar
    1.57 +            role: ROLE_SLIDER,
    1.58 +            children: []
    1.59 +          },
    1.60 +        ]
    1.61 +      };
    1.62 +      testAccessibleTree("audio", accTree);
    1.63 +
    1.64 +      todo(false, "Enable name test for slider. Fail on Linux.");
    1.65 +      SimpleTest.finish();
    1.66 +    }
    1.67 +
    1.68 +    SimpleTest.waitForExplicitFinish();
    1.69 +    addA11yLoadEvent(doTest);
    1.70 +  </script>
    1.71 +</head>
    1.72 +<body>
    1.73 +
    1.74 +  <a target="_blank"
    1.75 +     title="Expose HTML5 video and audio elements' embedded controls through accessibility APIs"
    1.76 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=483573">Mozilla Bug 483573</a>
    1.77 +  <p id="display"></p>
    1.78 +  <div id="content" style="display: none"></div>
    1.79 +  <pre id="test">
    1.80 +  </pre>
    1.81 +
    1.82 +  <audio id="audio" src="../bug461281.ogg"
    1.83 +         controls="true"></audio>
    1.84 +
    1.85 +  <div id="eventDump"></div>
    1.86 +</body>
    1.87 +</html>

mercurial