OLD | NEW |
1 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=62320">bug 62320</a
>: | 1 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=62320">bug 62320</a
>: |
2 Emit an error event when a request to enter full-screen is rejected.</p> | 2 Emit an error event when a request to enter full-screen is rejected.</p> |
3 <p>Tests that the document is still messaged if the element requesting full scre
en is removed before the event is generated.</p> | 3 <p>Tests that the document is still messaged if the element requesting full scre
en is removed before the event is generated.</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 waitForEventAndEnd(document, 'webkitfullscreenchange', function() { | 7 waitForEventAndEnd(document, 'webkitfullscreenchange', function() { |
8 consoleWrite("FAIL - entered full screen!"); | 8 consoleWrite("FAIL - entered full screen!"); |
9 }); | 9 }); |
10 | 10 |
11 waitForEventAndEnd(document, 'webkitfullscreenerror', function() { | 11 waitForEventAndEnd(document, 'webkitfullscreenerror', function() { |
12 consoleWrite("SUCCEED - did not enter full screen!"); | 12 consoleWrite("SUCCEED - did not enter full screen!"); |
13 }); | 13 }); |
14 | 14 |
15 if (layoutTestController) | |
16 layoutTestController.setPopupBlockingEnabled(true); | |
17 | |
18 var div = document.createElement('div'); | 15 var div = document.createElement('div'); |
19 document.documentElement.appendChild(div); | 16 document.documentElement.appendChild(div); |
20 consoleWrite("Added child element.") | 17 consoleWrite("Added child element.") |
21 div.webkitRequestFullScreen(); | 18 div.webkitRequestFullScreen(); |
22 document.documentElement.removeChild(div); | 19 document.documentElement.removeChild(div); |
23 consoleWrite("Removed child element.") | 20 consoleWrite("Removed child element.") |
24 } | 21 } |
25 | 22 |
26 runTest(); | 23 runTest(); |
27 </script> | 24 </script> |
OLD | NEW |