Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fullscreen / exit-full-screen-iframe.html
blobe753659acff1d9c8cafc62730455beee00e40367
1 <!DOCTYPE html>
2 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=90327">bug 90327</a>:
3 webkitCancelFullScreen for iframes</p>
4 <p>To test manually, click the "Go full screen" button - the page should enter full screen mode and immediately exit again, without crashing.</p>
5 <script src="full-screen-test.js"></script>
6 <script>
7 function runTest() {
8 var frame = document.getElementById('frame');
10 waitForEventOnce(frame.contentDocument, 'webkitfullscreenchange', function() {
11 test("document.getElementById('frame').contentDocument.webkitIsFullScreen==true")
12 waitForEventOnce(frame.contentDocument, 'webkitfullscreenchange', function() {
13 test("document.getElementById('frame').contentDocument.webkitIsFullScreen==false")
14 endTest();
15 });
17 document.webkitCancelFullScreen();
18 });
20 runWithKeyDown(function() {
21 frame.contentDocument.documentElement.webkitRequestFullScreen();
22 });
24 </script>
25 <iframe id="frame" src="resources/inner.html" width="300" height="100" onload="runTest()" allowfullscreen>
26 </iframe>