3 <title>Test rendering of video control after exiting fullscreen
</title>
4 <script src=media-file.js
></script>
5 <script src=media-controls.js
></script>
6 <script src=video-test.js
></script>
7 <script src=../fullscreen/full-screen-test.js
></script>
10 var playButtonCoordinates
;
16 waitForEvent(video
, 'canplaythrough', oncanplaythrough
);
17 video
.src
= findMediaFile('video', 'content/test');
20 function oncanplaythrough()
22 waitForEvent(video
, 'webkitfullscreenchange', onfullscreenchange
);
24 panel
= mediaControlsButton(video
, "panel");
25 if (window
.eventSender
) {
27 playButtonCoordinates
= mediaControlsButtonCoordinates(video
, "play-button");
29 testRunner
.notifyDone();
32 var x
= playButtonCoordinates
[0];
33 var y
= playButtonCoordinates
[1];
35 consoleWrite("** Move mouse to the play button and start playing the video **");
36 eventSender
.mouseMoveTo(x
, y
);
37 eventSender
.mouseDown();
38 eventSender
.mouseUp();
42 consoleWrite("** Test that controls are shown when controls attribute is present **");
43 var opacity
= getComputedStyle(panel
).opacity
;
45 failTest("Media control is not opaque.");
47 runWithKeyDown(function(){ video
.webkitRequestFullscreen(); });
50 function onfullscreenchange()
54 runAfterHideMediaControlsTimerFired(continueTest
, video
);
58 consoleWrite("** The controls should be shown after exiting the fullscreen");
59 var opacity
= getComputedStyle(panel
).opacity
;
61 failTest("Media control is not opaque.");
68 function continueTest()
71 run("document.webkitExitFullscreen()");
76 <body onload=
"init()">
77 Tests that video controls are shwon after exiting fullscreen
<br>
78 <video controls
></video>