3 <title>Test rendering of volume slider of video tag
</title>
4 <script src=media-file.js
></script>
5 <script src=media-controls.js
></script>
6 <script src=video-test.js
></script>
10 var muteButtonCoordinates
;
14 video
= document
.getElementsByTagName("video")[0];
15 video
.src
= findMediaFile("video", "content/test");
18 consoleWrite("** Playing the video **");
24 panel
= mediaControlsButton(video
, "panel");
26 if (window
.eventSender
) {
28 muteButtonCoordinates
= mediaControlsButtonCoordinates(video
, "mute-button");
30 testRunner
.notifyDone();
35 consoleWrite("** Move mouse somewhere over the panel **");
36 run("eventSender.mouseMoveTo(muteButtonCoordinates[0], muteButtonCoordinates[1])");
40 consoleWrite("** Test that controls are shown when controls attribute is present **");
41 testExpected("panel.style['display']", 'none', "!=");
43 if (window
.eventSender
) {
45 consoleWrite("** Move mouse outside the video **");
46 run("eventSender.mouseMoveTo(video.offsetLeft, video.offsetTop + 2 * video.offsetHeight)");
49 setTimeout(continueTest
, controlsFadeOutDurationMs
);
52 function continueTest()
54 if (panel
.style
['display'] != 'none') {
55 setTimeout(continueTest
, controlsFadeOutDurationMs
);
60 consoleWrite("** The controls should have the display property set to none");
61 testExpected("panel.style['display']", 'none', "==");
64 consoleWrite("** Remove controls attribute**");
65 run("video.removeAttribute('controls')");
68 consoleWrite("** Move mouse back over the panel **");
69 run("eventSender.mouseMoveTo(muteButtonCoordinates[0], muteButtonCoordinates[1])");
72 consoleWrite("** Video controls should not be shown **");
73 testExpected("panel.style['display']", 'none', "==");
82 <body onload=
"init()">
83 Tests that showing / hiding video controls uses the sets the display:none property
<br>
84 <video onplay=
"test()" controls
></video>