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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/document-exit-fullscreen-twice-manual.html

Issue 2572333003: Import wpt@4970d7334aaf8977c5b617075aa48be1b6e482c7 (Closed)
Patch Set: Update TestExpectations 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/imported/wpt/fullscreen/api/document-exit-fullscreen-twice-manual.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/document-exit-fullscreen-twice-manual.html b/third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/document-exit-fullscreen-twice-manual.html
new file mode 100644
index 0000000000000000000000000000000000000000..c80aeb416958565fc6607488a1c9c70b2ca0399b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/document-exit-fullscreen-twice-manual.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Document#exitFullscreen() called twice</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../trusted-click.js"></script>
+<div id="log"></div>
+<script>
+async_test(t => {
+ const div = document.querySelector("div");
+
+ document.onfullscreenchange = t.step_func(() => {
+ // We are now in fullscreen.
+ assert_equals(document.fullscreenElement, div);
+
+ document.onfullscreenchange = t.step_func(() => {
+ assert_equals(document.fullscreenElement, null);
+ // Done, but ensure that there's only one fullscreenchange event.
+ document.onfullscreenchange = t.unreached_func("second fullscreenchange event");
+ setTimeout(t.step_func_done(), 0);
+ });
+
+ // Exit fullscreen twice.
+ document.exitFullscreen();
+ assert_equals(document.fullscreenElement, div, "fullscreenElement after first exitFullscreen()");
+ document.exitFullscreen();
+ assert_equals(document.fullscreenElement, div, "fullscreenElement after second exitFullscreen()");
+ });
+ document.onfullscreenerror = t.unreached_func("fullscreenerror event");
+
+ trusted_request(div);
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698