Index: LayoutTests/media/video-controls-fullscreen-iframe.html |
diff --git a/LayoutTests/media/video-controls-fullscreen-iframe.html b/LayoutTests/media/video-controls-fullscreen-iframe.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2eb4813b062f62a2b0ce1477a7f7a58e0187b430 |
--- /dev/null |
+++ b/LayoutTests/media/video-controls-fullscreen-iframe.html |
@@ -0,0 +1,35 @@ |
+<!DOCTYPE html> |
+<html> |
+ <head> |
+ <title>video controls fullscreen button in iframe without allowfullscreen attribute</title> |
+ <script src="../resources/testharness.js"></script> |
+ <script src="../resources/testharnessreport.js"></script> |
+ <script src="media-file.js"></script> |
+ <script src="media-controls.js"></script> |
+ </head> |
+ <body> |
+ <div id="log"></div> |
+ <iframe srcdoc="<video controls>" width="400" height="300"></iframe> |
+ <script> |
+ async_test(function() |
+ { |
+ var iframe = document.querySelector('iframe'); |
+ iframe.onload = this.step_func(function() |
+ { |
+ var video = iframe.contentDocument.querySelector('video'); |
+ 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! :)
|
+ video.onloadeddata = this.step_func(function() |
+ { |
+ // click the fullscreen button |
+ var coords = mediaControlsButtonCoordinates(video, "fullscreen-button"); |
+ eventSender.mouseMoveTo(iframe.offsetLeft + coords[0], iframe.offsetTop + coords[1]); |
+ eventSender.mouseDown(); |
+ eventSender.mouseUp(); |
+ // wait for the fullscreenchange event |
+ video.onwebkitfullscreenchange = this.step_func_done(); |
+ }); |
+ }); |
+ }); |
+ </script> |
+ </body> |
+</html> |