Index: third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-prefixed.html |
diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-prefixed.html b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-prefixed.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..62a78e6c5a528cb57d0e183738f4db0cf419dd7e |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-prefixed.html |
@@ -0,0 +1,23 @@ |
+<!DOCTYPE html> |
+<title>Element#webkitRequestFullscreen() followed by removing the element</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> |
+<script> |
+async_test(t => { |
+ const target = document.getElementById("target"); |
+ |
+ document.onwebkitfullscreenchange = t.unreached_func("webkitfullscreenchange event"); |
+ document.onwebkitfullscreenerror = t.step_func_done(event => { |
+ assert_equals(event.target, document); |
+ assert_equals(document.webkitFullscreenElement, null); |
+ }); |
+ |
+ trusted_click(t.step_func(() => { |
+ target.webkitRequestFullscreen(); |
+ target.remove(); |
+ }), document.body); |
+}); |
+</script> |