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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-same-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/element-request-fullscreen-same-manual.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-same-manual.html b/third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-same-manual.html
new file mode 100644
index 0000000000000000000000000000000000000000..a475c18194bb53c1c1a8190f37b95360d1b49c9f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-same-manual.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Element#requestFullscreen() on the current fullscreen 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 => {
+ var target = document.getElementById("target");
+
+ document.onfullscreenchange = t.step_func(() => {
+ assert_equals(document.fullscreenElement, target);
+
+ // The next requestFullscreen() should fire no events due to "If element is
+ // doc's fullscreen element, terminate these subsubsteps."
+ document.onfullscreenchange = t.unreached_func("fullscreenchange event");
+
+ trusted_click(t.step_func(() => {
+ target.requestFullscreen();
+
+ // Wait until after the next animation frame.
+ requestAnimationFrame(t.step_func_done());
+ }), target);
+ });
+ document.onfullscreenerror = t.unreached_func("fullscreenerror event");
+
+ trusted_request(target);
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698