blob: 2c4ff9e5a4bc016b1b17614ad0bdd94737f9d629 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<!DOCTYPE html>
<html>
<style>
#no-video-media {
width: 320px;
height: 240px;
}
</style>
<!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
(Please avoid writing new tests using video-test.js) -->
<script src=video-test.js></script>
<script src=media-file.js></script>
<script src=media-controls.js></script>
<script>
var controls;
function runTest()
{
video = document.getElementById("no-video-media");
testExpected("video.paused", true);
if (!window.testRunner)
return;
// Click the play button.
var playCoords = mediaControlsButtonCoordinates(video, "play-button");
var clickX = playCoords[0];
var clickY = playCoords[1];
eventSender.mouseMoveTo(clickX, clickY);
eventSender.mouseDown();
eventSender.mouseUp();
testExpected("video.paused", false);
runAfterHideMediaControlsTimerFired(function()
{
controls = mediaControlsButton(video, "panel");
testExpected("getComputedStyle(controls).opacity", 0);
consoleWrite("");
endTest();
}, video);
// Move the mouse to the upper-left corner of the video.
eventSender.mouseMoveTo(video.offsetLeft + 4, video.offsetTop + 4);
}
</script>
<body>
<p>Test video element control visibility when mouse is not over element.</p>
<p>This test only runs in DRT!</p>
<video id="no-video-media" controls loop oncanplaythrough="runTest()"></video>
<script>
setSrcById("no-video-media", findMediaFile("video", "content/test"));
</script>
</body>
</html>
|