Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>video controls fullscreen button in iframe without allowfullscree n attribute</title> | |
| 5 <script src="../resources/testharness.js"></script> | |
| 6 <script src="../resources/testharnessreport.js"></script> | |
| 7 <script src="media-file.js"></script> | |
| 8 <script src="media-controls.js"></script> | |
| 9 </head> | |
| 10 <body> | |
| 11 <div id="log"></div> | |
| 12 <iframe srcdoc="<video controls>" width="400" height="300"></iframe> | |
| 13 <script> | |
| 14 async_test(function() | |
| 15 { | |
| 16 var iframe = document.querySelector('iframe'); | |
| 17 iframe.onload = this.step_func(function() | |
| 18 { | |
| 19 var video = iframe.contentDocument.querySelector('video'); | |
| 20 video.src = findMediaFile("video", "content/test"); | |
|
falken
2015/04/21 01:10:09
nit: single-quotes vs double-quotes for string lit
philipj_slow
2015/04/21 09:31:59
Yes it should, copy+paste is no excuse! :)
| |
| 21 video.onloadeddata = this.step_func(function() | |
| 22 { | |
| 23 // click the fullscreen button | |
| 24 var coords = mediaControlsButtonCoordinates(video, "full screen-button"); | |
| 25 eventSender.mouseMoveTo(iframe.offsetLeft + coords[0], i frame.offsetTop + coords[1]); | |
| 26 eventSender.mouseDown(); | |
| 27 eventSender.mouseUp(); | |
| 28 // wait for the fullscreenchange event | |
| 29 video.onwebkitfullscreenchange = this.step_func_done(); | |
| 30 }); | |
| 31 }); | |
| 32 }); | |
| 33 </script> | |
| 34 </body> | |
| 35 </html> | |
| OLD | NEW |