Index: LayoutTests/fullscreen/full-screen-iframe-allowed-video.html |
diff --git a/LayoutTests/fullscreen/full-screen-iframe-allowed-video.html b/LayoutTests/fullscreen/full-screen-iframe-allowed-video.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f5021ca199439b12b1b3f907fc1ff253ce7a237e |
--- /dev/null |
+++ b/LayoutTests/fullscreen/full-screen-iframe-allowed-video.html |
@@ -0,0 +1,31 @@ |
+<!DOCTYPE html> |
+<html> |
+ <head> |
esprehn
2014/03/05 00:22:41
Leave out <html>, <head> and <body> then this test
qinmin
2014/03/05 01:34:42
Done.
|
+ <script> |
+ if (window.internals) |
+ runPixelTests = internals.runtimeFlags.overlayFullscreenVideoEnabled; |
+ </script> |
+ <script src="full-screen-test.js"></script> |
+ <script> |
+ window.onmessage = function () { // video has been loaded and messaged us. |
esprehn
2014/03/05 00:22:41
no space after function
qinmin
2014/03/05 01:34:42
Done.
|
+ // Send click to center of iframe. |
+ iframe = document.getElementById("frame"); |
+ x = iframe.offsetLeft + iframe.offsetWidth / 2; |
+ y = iframe.offsetTop + iframe.offsetHeight / 2; |
+ if (window.eventSender) { |
+ eventSender.mouseMoveTo(x, y); |
+ eventSender.mouseDown(); |
+ eventSender.mouseUp(); |
+ } |
+ window.onmessage = function (messageEvent) { |
esprehn
2014/03/05 00:22:41
This is pretty weird, you overwrite yourself here.
qinmin
2014/03/05 01:34:42
ok, use a variable to remember whether the video h
|
+ consoleWrite(messageEvent.data); |
+ endTest(); |
+ } |
+ } |
+ </script> |
+ </head> |
+ <body> |
+ Video inside an iframe is allowed to enter fullscreen</p> |
+ <iframe id="frame" src="resources/video.html" width="320" height="240" allowfullscreen></iframe> |
+ </body> |
+</html> |