OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <title>Tests that video controls are shown after exiting fullscreen.</title> | |
3 <script src="../fullscreen/full-screen-test.js"></script> | |
4 <script src="../resources/testharness.js"></script> | |
5 <script src="../resources/testharnessreport.js"></script> | |
6 <script src="media-file.js"></script> | |
7 <script src="media-controls.js"></script> | |
8 <video controls></video> | |
9 <script> | |
10 async_test(function(t) { | |
11 var count = 0; | |
12 var video = document.querySelector("video"); | |
13 | |
14 video.oncanplaythrough = t.step_func(function() { | |
15 | |
16 var panel = mediaControlsButton(video, "panel"); | |
17 video.onwebkitfullscreenchange = t.step_func(function() { | |
18 switch (count) { | |
19 case 0: | |
20 runAfterHideMediaControlsTimerFired(function() { | |
21 document.webkitExitFullscreen(); | |
22 }, video); | |
23 break; | |
24 case 1: | |
25 // The controls should be shown after exiting fullscreen. | |
26 assert_equals(getComputedStyle(panel).opacity, "1"); | |
27 t.done(); | |
28 } | |
29 count++; | |
30 }); | |
31 | |
32 var playButtonCoordinates = mediaControlsButtonCoordinates(video, "play-
button"); | |
33 // Move mouse to the play button and start playing the video. | |
34 eventSender.mouseMoveTo(playButtonCoordinates[0], playButtonCoordinates[
1]); | |
35 eventSender.mouseDown(); | |
36 eventSender.mouseUp(); | |
37 | |
38 // Test that controls are shown when controls attribute is present. | |
39 assert_equals(getComputedStyle(panel).opacity, "1"); | |
40 runWithKeyDown(function() { video.webkitRequestFullscreen(); }); | |
41 }); | |
42 | |
43 video.src = findMediaFile("video", "content/test"); | |
44 }); | |
45 </script> | |
OLD | NEW |