| OLD | NEW |
| 1 <script src="full-screen-test.js"></script> | 1 <script src="full-screen-test.js"></script> |
| 2 <div>This tests that full screen mode will not exit when a non-ancestor iframe i
s loaded in the page. Click <button onclick="startTest();">enter full screen</bu
tton> to start test.</div> | 2 <div>This tests that full screen mode will not exit when a non-ancestor iframe i
s loaded in the page. Click <button onclick="startTest();">enter full screen</bu
tton> to start test.</div> |
| 3 <div id="target"> | 3 <div id="target"> |
| 4 <iframe id="iframe"></iframe> | 4 <iframe id="iframe"></iframe> |
| 5 </div> | 5 </div> |
| 6 <script> | 6 <script> |
| 7 var target = document.getElementById('target'); | 7 var target = document.getElementById('target'); |
| 8 var iframe = document.getElementById('iframe'); | 8 var iframe = document.getElementById('iframe'); |
| 9 | 9 |
| 10 waitForEventOnce(document, 'webkitfullscreenchange', function() { | 10 waitForEventOnce(document, 'webkitfullscreenchange', function() { |
| 11 waitForEvent(document, 'webkitfullscreenchange', function() { | 11 waitForEvent(document, 'webkitfullscreenchange', function() { |
| 12 logResult(false, 'Exited full screen'); | 12 logResult(false, 'Exited full screen'); |
| 13 }); |
| 14 waitForEvent(iframe, 'load', function() { |
| 15 testExpected("document.webkitIsFullScreen", true); |
| 16 endTest(); |
| 13 }); | 17 }); |
| 14 iframe.src = 'resources/empty.html'; | 18 iframe.src = 'resources/empty.html'; |
| 15 }); | 19 }); |
| 16 | 20 |
| 17 waitForEvent(iframe, 'load', function() { | |
| 18 testExpected("document.webkitIsFullScreen", true); | |
| 19 endTest(); | |
| 20 }); | |
| 21 | |
| 22 var startTest = function() { | 21 var startTest = function() { |
| 23 target.webkitRequestFullscreen(); | 22 target.webkitRequestFullscreen(); |
| 24 }; | 23 }; |
| 25 | 24 |
| 26 if (window.testRunner) | 25 if (window.testRunner) |
| 27 runWithKeyDown(startTest); | 26 runWithKeyDown(startTest); |
| 28 </script> | 27 </script> |
| OLD | NEW |