blob: 687894eda7c7c18b19b45b77099589cfeef7c0b0 [file] [log] [blame]
<!-- webkit-test-runner [ JavaScriptCanOpenWindowsAutomatically=false ] -->
<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!");
});
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>