blob: 7d3e15ff381f9e0616748f939f6644ec7056673e [file] [log] [blame]
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=62320">bug 62320</a>:
Emit an error event when a request to enter full-screen is rejected.</p>
<p>Tests that the document is still messaged if the element requesting full screen is removed before the event is generated.</p>
<script src="full-screen-test.js"></script>
<script>
function runTest() {
waitForEventAndEnd(document, 'webkitfullscreenchange', function() {
consoleWrite("FAIL - entered full screen!");
});
waitForEventAndEnd(document, 'webkitfullscreenerror', function() {
consoleWrite("SUCCEED - did not enter full screen!");
});
if (testRunner)
testRunner.setPopupBlockingEnabled(true);
var div = document.createElement('div');
document.documentElement.appendChild(div);
consoleWrite("Added child element.")
div.webkitRequestFullScreen();
document.documentElement.removeChild(div);
consoleWrite("Removed child element.")
}
runTest();
</script>