Index: third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move.html |
diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move.html b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5189566b4e6a3baca76c6a65a640f9c131142850 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move.html |
@@ -0,0 +1,27 @@ |
+<!DOCTYPE html> |
+<title>Element#requestFullscreen() followed by moving the element within the document</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> |
+<div id="moveto"></div> |
+<script> |
+// Adapted from https://github.com/w3c/web-platform-tests/pull/4250 |
+// TODO(foolip): Remove this test when the above is imported and passing. |
+async_test(t => { |
+ const target = document.getElementById("target"); |
+ const moveTo = document.getElementById("moveto"); |
+ |
+ document.onfullscreenchange = t.step_func_done(() => { |
+ assert_equals(document.fullscreenElement, null); |
+ assert_equals(target.parentNode, moveTo); |
+ }); |
+ document.onfullscreenerror = t.unreached_func("fullscreenchange event"); |
+ |
+ trusted_click(t.step_func(() => { |
+ target.requestFullscreen(); |
+ moveTo.appendChild(target); |
+ }), document.body); |
+}); |
+</script> |