OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script> | 2 <script> |
3 runPixelTests = true; | 3 runPixelTests = true; |
4 </script> | 4 </script> |
5 <script src="../../../fullscreen/full-screen-test.js"></script> | 5 <script src="../../../fullscreen/full-screen-test.js"></script> |
6 <script> | 6 <script> |
7 var initialized = false; | 7 var initialized = false; |
8 window.onmessage = function(messageEvent) { | 8 window.onmessage = function(messageEvent) { |
9 if (!initialized) { | 9 if (!initialized) { |
10 window.scrollTo(0, 100); | 10 window.scrollTo(0, 100); |
11 // video has been loaded and messaged us. | 11 // video has been loaded and messaged us. |
12 // Send click to center of iframe. | 12 // Send click to iframe (not the center since this will hit the over
lay play button). |
13 iframe = document.getElementById("frame"); | 13 iframe = document.getElementById("frame"); |
14 x = iframe.offsetLeft + iframe.offsetWidth / 2; | 14 x = iframe.offsetLeft + 10; |
15 y = iframe.offsetTop + iframe.offsetHeight / 2; | 15 y = iframe.offsetTop + 10; |
16 if (window.eventSender) { | 16 if (window.eventSender) { |
17 eventSender.mouseMoveTo(x, y); | 17 eventSender.mouseMoveTo(x, y); |
18 eventSender.mouseDown(); | 18 eventSender.mouseDown(); |
19 eventSender.mouseUp(); | 19 eventSender.mouseUp(); |
20 } | 20 } |
21 initialized = true; | 21 initialized = true; |
22 } else { | 22 } else { |
23 consoleWrite(messageEvent.data); | 23 consoleWrite(messageEvent.data); |
24 endTest(); | 24 endTest(); |
25 } | 25 } |
26 } | 26 } |
27 </script> | 27 </script> |
28 <iframe id="frame" src="../../../fullscreen/resources/video.html" width="320" he
ight="240" allowfullscreen></iframe> | 28 <iframe id="frame" src="../../../fullscreen/resources/video.html" width="320" he
ight="240" allowfullscreen></iframe> |
29 <div style="height:1000px">Video inside iframe should be positioned correctly in
overlay fullscreen mode.</div> | 29 <div style="height:1000px">Video inside iframe should be positioned correctly in
overlay fullscreen mode.</div> |
OLD | NEW |