1 <script src=
"full-screen-test.js"></script>
2 <div>This tests that full screen mode will not exit when a non-ancestor iframe is loaded in the page. Click
<button onclick=
"startTest();">enter full screen
</button> to start test.
</div>
4 <iframe id=
"iframe"></iframe>
7 var target
= document
.getElementById('target');
8 var iframe
= document
.getElementById('iframe');
10 waitForEventOnce(document
, 'webkitfullscreenchange', function() {
11 waitForEvent(document
, 'webkitfullscreenchange', function() {
12 logResult(false, 'Exited full screen');
14 iframe
.src
= 'resources/empty.html';
17 waitForEvent(iframe
, 'load', function() {
18 testExpected("document.webkitIsFullScreen", true);
22 var startTest = function() {
23 target
.webkitRequestFullscreen();
26 if (window
.testRunner
)
27 runWithKeyDown(startTest
);