accessible/tests/mochitest/tree/test_media.html

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

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

mercurial