OLD | NEW |
1 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=90327">bug 90327</a>
: | 1 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=90327">bug 90327</a>
: |
2 webkitCancelFullScreen for iframes</p> | 2 webkitCancelFullScreen for iframes</p> |
3 <p>To test manually, click the "Go full screen" button - the page should enter f
ull screen mode and immediately exit again, without crashing.</p> | 3 <p>To test manually, click the "Go full screen" button - the page should enter f
ull screen mode and immediately exit again, without crashing.</p> |
4 <script src="full-screen-test.js"></script> | 4 <script src="full-screen-test.js"></script> |
5 <script> | 5 <script> |
6 function runTest() { | 6 function runTest() { |
7 var frame = document.getElementById('frame'); | 7 var frame = document.getElementById('frame'); |
8 | 8 |
9 waitForEventOnce(frame.contentDocument, 'webkitfullscreenchange', function()
{ | 9 waitForEventOnce(frame.contentDocument, 'webkitfullscreenchange', function()
{ |
10 test("document.getElementById('frame').contentDocument.webkitIsFullScree
n==true") | 10 test("document.getElementById('frame').contentDocument.webkitIsFullScree
n==true") |
11 waitForEventOnce(frame.contentDocument, 'webkitfullscreenchange', functi
on() { | 11 waitForEventOnce(frame.contentDocument, 'webkitfullscreenchange', functi
on() { |
12 test("document.getElementById('frame').contentDocument.webkitIsFullS
creen==false") | 12 test("document.getElementById('frame').contentDocument.webkitIsFullS
creen==false") |
13 endTest(); | 13 endTest(); |
14 }); | 14 }); |
15 | 15 |
16 document.webkitCancelFullScreen(); | 16 document.webkitCancelFullScreen(); |
17 }); | 17 }); |
18 | 18 |
19 runWithKeyDown(function() { | 19 runWithKeyDown(function() { |
20 | |
21 setTimeout(function() { | |
22 consoleWrite("FAIL - did not enter and exit full screen in time!"); | |
23 endTest(); | |
24 }, 100); | |
25 | |
26 frame.contentDocument.documentElement.webkitRequestFullScreen(); | 20 frame.contentDocument.documentElement.webkitRequestFullScreen(); |
27 }); | 21 }); |
28 } | 22 } |
29 </script> | 23 </script> |
30 <iframe id="frame" src="resources/inner.html" width="300" height="100" onload="r
unTest()" webkitallowfullscreen> | 24 <iframe id="frame" src="resources/inner.html" width="300" height="100" onload="r
unTest()" webkitallowfullscreen> |
31 </iframe> | 25 </iframe> |
OLD | NEW |