Index: third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move-to-iframe-prefixed.html |
diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move-to-iframe-prefixed.html b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move-to-iframe-prefixed.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ef873a6303fa05c6fcba680ddb12ca3424f4f3cd |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move-to-iframe-prefixed.html |
@@ -0,0 +1,28 @@ |
+<!DOCTYPE html> |
+<title>Element#webkitRequestFullscreen() followed by moving the element into an iframe</title> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script src="../trusted-click.js"></script> |
+<div id="log"></div> |
+<div id="target"></div> |
+<iframe allowfullscreen></iframe> |
+<script> |
+async_test(t => { |
+ const target = document.getElementById("target"); |
+ const iframeDoc = document.querySelector("iframe").contentDocument; |
+ |
+ iframeDoc.onwebkitfullscreenchange = t.unreached_func("webkitfullscreenchange event in iframe"); |
+ iframeDoc.onwebkitfullscreenerror = t.unreached_func("webkitfullscreenerror event in iframe"); |
+ document.onwebkitfullscreenchange = t.unreached_func("webkitfullscreenchange event"); |
+ document.onwebkitfullscreenerror = t.step_func_done(event => { |
+ assert_equals(event.target, document); |
+ assert_equals(document.webkitFullscreenElement, null); |
+ assert_equals(iframeDoc.webkitFullscreenElement, null); |
+ }); |
+ |
+ trusted_click(t.step_func(() => { |
+ target.webkitRequestFullscreen(); |
+ iframeDoc.body.appendChild(target); |
+ }), document.body); |
+}); |
+</script> |