| <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() { |
| frame.webkitRequestFullScreen(); |
| }); |
| } |
| </script> |
| <iframe id="frame" src='data:text/html, |
| iframe |
| <script> |
| parent.postMessage("document.webkitFullscreenEnabled == " + document.webkitFullscreenEnabled, "*"); |
| </script> |
| '> |
| </iframe> |
| |