accessible/tests/mochitest/tree/test_media.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE html>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=483573
     5 -->
     6 <head>
     7   <title>HTML5 audio/video tests</title>
     8   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
    10   <script type="application/javascript"
    11           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    13   <script type="application/javascript"
    14           src="../common.js"></script>
    15   <script type="application/javascript"
    16           src="../role.js"></script>
    17   <script type="application/javascript"
    18           src="../states.js"></script>
    20   <script type="application/javascript">
    22     function doTest()
    23     {
    24       //////////////////////////////////////////////////////////////////////////
    25       // test the accessible tree
    27       var accTree = {
    28         role: ROLE_GROUPING,
    29         children: [
    30           { // start/stop button
    31             role: ROLE_PUSHBUTTON,
    32             name: "Play",
    33             children: []
    34           },
    35           { // buffer bar
    36             role: ROLE_PROGRESSBAR,
    37             children: []
    38           },
    39           { // progress bar
    40             role: ROLE_PROGRESSBAR,
    41             children: []
    42           },
    43           { // slider of progress bar
    44             role: ROLE_SLIDER,
    45             //name: "0:00 of 0:02 elapsed",
    46             children: []
    47           },
    48           { // mute button
    49             role: ROLE_PUSHBUTTON,
    50             name: "Mute",
    51             children: []
    52           },
    53           { // slider of volume bar
    54             role: ROLE_SLIDER,
    55             children: []
    56           },
    57         ]
    58       };
    59       testAccessibleTree("audio", accTree);
    61       todo(false, "Enable name test for slider. Fail on Linux.");
    62       SimpleTest.finish();
    63     }
    65     SimpleTest.waitForExplicitFinish();
    66     addA11yLoadEvent(doTest);
    67   </script>
    68 </head>
    69 <body>
    71   <a target="_blank"
    72      title="Expose HTML5 video and audio elements' embedded controls through accessibility APIs"
    73      href="https://bugzilla.mozilla.org/show_bug.cgi?id=483573">Mozilla Bug 483573</a>
    74   <p id="display"></p>
    75   <div id="content" style="display: none"></div>
    76   <pre id="test">
    77   </pre>
    79   <audio id="audio" src="../bug461281.ogg"
    80          controls="true"></audio>
    82   <div id="eventDump"></div>
    83 </body>
    84 </html>

mercurial