Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / video-prefixed-fullscreen.html
blob50287ca689fe6a9be0988f4517501206897397b4
1 <!doctype html>
2 <html>
3 <head>
4 <title>Test the prefixed HTMLVideoElement fullscreen API</title>
5 <script src="media-file.js"></script>
6 <script src="video-test.js"></script>
7 <script>
8 function start()
10 findMediaElement();
11 testExpected("video.webkitSupportsFullscreen", true);
12 testExpected("video.webkitDisplayingFullscreen", false);
13 video.src = findMediaFile("video", "content/test");
14 waitForEvent("loadeddata", loadeddata);
17 function loadeddata()
19 testExpected("video.webkitSupportsFullscreen", true);
20 testExpected("video.webkitDisplayingFullscreen", false);
21 run("video.webkitEnterFullscreen()");
22 waitForEvent("webkitfullscreenerror", fullscreenerror);
25 function fullscreenerror()
27 testExpected("video.webkitSupportsFullscreen", true);
28 testExpected("video.webkitDisplayingFullscreen", false);
29 document.onclick = function()
31 run("video.webkitEnterFullscreen()");
32 waitForEventOnce("webkitfullscreenchange", fullscreenenter);
34 eventSender.mouseDown();
35 eventSender.mouseUp();
38 function fullscreenenter()
40 testExpected("video.webkitSupportsFullscreen", true);
41 testExpected("video.webkitDisplayingFullscreen", true);
42 run("video.webkitExitFullscreen()");
43 waitForEvent("webkitfullscreenchange", fullscreenexit);
46 function fullscreenexit()
48 testExpected("video.webkitSupportsFullscreen", true);
49 testExpected("video.webkitDisplayingFullscreen", false);
50 endTest();
52 </script>
53 </head>
54 <body onload="start()">
55 <p>Test the prefixed HTMLVideoElement fullscreen API</p>
56 <video></video>
57 </body>
58 </html>