1 <script src="../fast/js/resources/js-test-pre.js"></script>
3 if (window.layoutTestController) {
4 layoutTestController.dumpAsText();
5 layoutTestController.waitUntilDone();
8 function runWithKeyDown(fn)
10 document.addEventListener('keydown', function() { fn(); }, false);
11 if (window.layoutTestController) {
12 eventSender.keyDown('a');
17 // Bail out early if the full screen API is not enabled or is missing:
18 if (Element.prototype.webkitRequestFullScreen == undefined) {
19 alert("Fullscreen API not available.");
21 runWithKeyDown(goFullScreen);
25 function goFullScreen() {
26 var iframe = document.getElementById('block1');
27 var element = iframe.contentDocument.documentElement;
28 setTimeout(function () {
29 iframe.parentNode.removeChild(iframe);
31 setTimeout(function () {
32 if (window.layoutTestController) {
33 layoutTestController.notifyDone();
37 element.webkitRequestFullScreen();
40 <body onload="init()">
41 <iframe webkitallowfullscreen src="resources/inner.html" id="block1"></iframe>