<p>Test entering full screen security restrictions. An iframe without an allow attribute
is still permitted to fullscreen if the request comes from the containing document.</p>
<p>To test manually, press any key - the page should enter full screen mode.</p>
<script src="full-screen-test.js"></script>
<script>
window.onmessage = function (e) {
    frame = document.getElementById('frame');

    test("document.webkitFullscreenEnabled");
    consoleWrite("iframe's webkitFullscreenEnabled should be false:");
    iframeMessage = e.data;
    test("iframeMessage == 'document.webkitFullscreenEnabled == false'");

    waitForEvent(document, 'webkitfullscreenchange', function() {
            consoleWrite("SUCCEED - entered full screen!");
            endTest();
    });

    runWithKeyDown(function() {
        setTimeout(function() {
            consoleWrite("FAIL - did not enter full screen!");
            endTest();
        }, 50);
        frame.webkitRequestFullScreen();
    });
}
</script>
<iframe id="frame" src='data:text/html,
    iframe
    <script>
        parent.postMessage("document.webkitFullscreenEnabled == " + document.webkitFullscreenEnabled, "*");
    </script>
    '>
</iframe>

