Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fullscreen / full-screen-request-removed.html
blob7d3e15ff381f9e0616748f939f6644ec7056673e
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>
3 <p>Tests that the document is still messaged if the element requesting full screen is removed before the event is generated.</p>
4 <script src="full-screen-test.js"></script>
5 <script>
6 function runTest() {
7 waitForEventAndEnd(document, 'webkitfullscreenchange', function() {
8 consoleWrite("FAIL - entered full screen!");
9 });
11 waitForEventAndEnd(document, 'webkitfullscreenerror', function() {
12 consoleWrite("SUCCEED - did not enter full screen!");
13 });
15 if (testRunner)
16 testRunner.setPopupBlockingEnabled(true);
18 var div = document.createElement('div');
19 document.documentElement.appendChild(div);
20 consoleWrite("Added child element.")
21 div.webkitRequestFullScreen();
22 document.documentElement.removeChild(div);
23 consoleWrite("Removed child element.")
26 runTest();
27 </script>