summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fullscreen/full-screen-iframe-legacy.html
blob: 3c0aa98b7a2d6bfbb12ccef6142839119696118c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<p>HTMLVideoElement.webkitEnterFullScreen() in an iframe requires the allowfullscreen attribute</p>
<script src="full-screen-test.js"></script>
<script src="../media/media-file.js"></script>
<script>
var frame, video;

function canplaythrough() {
    testExpected("video.webkitDisplayingFullscreen", false);
    runWithKeyDown(function() {
        video.webkitEnterFullScreen();
    });
    waitForEventAndEnd(frame.contentDocument, "webkitfullscreenerror");
}

function runTest() {
    frame = document.getElementById("frame");
    video = frame.contentDocument.querySelector("video");
    video.src = findMediaFile("video", "../../media/content/test");
    video.addEventListener("canplaythrough", canplaythrough);
}
</script>
<iframe id="frame" src="resources/legacy.html" onload="runTest()" width="336" height="256">
</iframe>