Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Unified Diff: third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move-to-iframe-prefixed.html

Issue 2573773002: Sync requestFullscreen() and exitFullscreen() algorithms with the spec (Closed)
Patch Set: address feedback Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698