OLD | NEW |
1 <p>Test entering full screen for a nested iframe works with a mixture of both | 1 <!DOCTYPE html> |
2 allowfullscreen and webkitallowfullscreen.</p> | 2 <p>Test entering full screen for nested iframes.</p> |
3 <p>To test manually, click into inner frame, the page should enter full screen m
ode.</p> | 3 <p>To test manually, click into inner frame, the page should enter full screen m
ode.</p> |
4 <script src="full-screen-test.js"></script> | 4 <script src="full-screen-test.js"></script> |
5 <iframe webkitallowfullscreen src="resources/full-screen-iframe-with-mixed-allow
-webkitallow-iframe1.html"> | 5 <iframe allowfullscreen src="resources/full-screen-iframe-allowed-nested1.html"> |
6 </iframe> | 6 </iframe> |
7 <script> | 7 <script> |
8 window.onmessage = function () { // iframes have been loaded and messaged us. | 8 window.onmessage = function () { // iframes have been loaded and messaged us. |
9 // Send click to center of iframe. | 9 // Send click to center of iframe. |
10 iframe = document.getElementsByTagName("iframe")[0]; | 10 iframe = document.getElementsByTagName("iframe")[0]; |
11 x = iframe.offsetLeft + iframe.offsetWidth / 2; | 11 x = iframe.offsetLeft + iframe.offsetWidth / 2; |
12 y = iframe.offsetTop + iframe.offsetHeight / 2; | 12 y = iframe.offsetTop + iframe.offsetHeight / 2; |
13 if (window.eventSender) { | 13 if (window.eventSender) { |
14 eventSender.mouseMoveTo(x, y); | 14 eventSender.mouseMoveTo(x, y); |
15 eventSender.mouseDown(); | 15 eventSender.mouseDown(); |
16 eventSender.mouseUp(); | 16 eventSender.mouseUp(); |
17 } | 17 } |
18 | 18 |
19 window.onmessage = function (messageEvent) { | 19 window.onmessage = function (messageEvent) { |
20 consoleWrite(messageEvent.data); | 20 consoleWrite(messageEvent.data); |
21 endTest(); | 21 endTest(); |
22 } | 22 } |
23 } | 23 } |
24 </script> | 24 </script> |
25 | |
OLD | NEW |