OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <style> | |
4 #no-video-media { | |
5 width: 320px; | |
6 height: 240px; | |
7 } | |
8 </style> | |
9 <script src=video-test.js></script> | |
10 <script src=media-file.js></script> | |
11 <script src=media-controls.js></script> | |
12 <script> | |
13 var controls; | |
14 | |
15 function runTest() | |
16 { | |
17 video = document.getElementById("no-video-media"); | |
18 video.addEventListener("timeupdate", function() | |
19 { | |
20 if (video.currentTime < 4) | |
acolwell GONE FROM CHROMIUM
2014/05/23 18:26:28
ditto. Actually, I wonder if we should put this fu
| |
21 return; | |
22 controls = mediaControlsButton(video, "panel"); | |
23 testExpected("getComputedStyle(controls).opacity", 0); | |
24 | |
25 consoleWrite(""); | |
26 endTest(); | |
27 }); | |
28 | |
29 testExpected("video.paused", true); | |
30 if (!window.testRunner) | |
31 return; | |
32 | |
33 // Click the play button. | |
34 var playCoords = mediaControlsButtonCoordinates(video, "play-button"); | |
35 var clickX = playCoords[0]; | |
36 var clickY = playCoords[1]; | |
37 eventSender.mouseMoveTo(clickX, clickY); | |
38 eventSender.mouseDown(); | |
39 eventSender.mouseUp(); | |
40 testExpected("video.paused", false); | |
41 | |
42 // Move the mouse to the upper-left corner of the video. | |
43 eventSender.mouseMoveTo(video.offsetLeft + 4, video.offsetTop + 4); | |
44 } | |
45 </script> | |
46 <body> | |
47 <p>Test video element control visibility when mouse is not over element.</p> | |
48 <p>This test only runs in DRT!</p> | |
49 | |
50 <video id="no-video-media" controls loop oncanplaythrough="runTest()"></vide o> | |
51 <script> | |
52 setSrcById("no-video-media", findMediaFile("video", "content/test")); | |
53 </script> | |
54 </body> | |
55 </html> | |
OLD | NEW |