blob: 48c15eb7ca60b5c4276cdaeac3e1dfb72e7508e3 (
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
|
<!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;
// Tap the play button
var coords = mediaControlsButtonCoordinates(video, "play-button");
eventSender.gestureTapDown(coords[0], coords[1]);
eventSender.gestureShowPress(coords[0], coords[1]);
eventSender.gestureTap(coords[0], coords[1]);
testExpected("video.paused", false);
runAfterHideMediaControlsTimerFired(function()
{
controls = mediaControlsButton(video, "panel");
testExpected("getComputedStyle(controls).opacity", 0);
consoleWrite("");
endTest();
}, video);
}
</script>
<body>
<p>Test video element control visibility after touch on control. After a delay the
controls must be hidden.</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>
|