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

Unified Diff: LayoutTests/fullscreen/full-screen-prefixed-and-unprefixed.html

Issue 395633011: Implement the unprefixed the Fullscreen API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nits Created 6 years, 4 months 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: LayoutTests/fullscreen/full-screen-prefixed-and-unprefixed.html
diff --git a/LayoutTests/fullscreen/full-screen-prefixed-and-unprefixed.html b/LayoutTests/fullscreen/full-screen-prefixed-and-unprefixed.html
new file mode 100644
index 0000000000000000000000000000000000000000..aac7d6ae7f102d5d47f5c47d7ba6249f5c105c6e
--- /dev/null
+++ b/LayoutTests/fullscreen/full-screen-prefixed-and-unprefixed.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<title>Mixed prefixed and unprefixed requests</title>
+<script src="full-screen-test.js"></script>
+<div><span></span></div>
+<script>
+var callback;
+function fullscreenChanged(event)
+{
+ if (callback)
+ callback(event)
+}
+waitForEvent(document, "fullscreenchange", fullscreenChanged);
+waitForEvent(document, "webkitfullscreenchange", fullscreenChanged);
+
+var div = document.querySelector("div");
+var span = document.querySelector("span");
+
+function divEnteredFullscreen()
+{
+ testExpected("document.fullscreenElement", div);
+ testExpected("document.webkitFullscreenElement", div);
+ callback = spanEnteredFullscreen;
+ runWithKeyDown(function() { span.requestFullscreen(); });
+}
+
+function spanEnteredFullscreen()
+{
+ testExpected("document.fullscreenElement", span);
+ testExpected("document.webkitFullscreenElement", span);
+ callback = spanExitedFullscreen;
+ document.webkitExitFullscreen();
+}
+
+function spanExitedFullscreen()
+{
+ testExpected("document.fullscreenElement", div);
+ testExpected("document.webkitFullscreenElement", div);
+ callback = divExitedFullscreen;
+ document.webkitExitFullscreen();
+}
+
+function divExitedFullscreen()
+{
+ testExpected("document.fullscreenElement", null);
+ testExpected("document.webkitFullscreenElement", null);
+ endTest();
+}
+
+callback = divEnteredFullscreen;
+runWithKeyDown(function() { div.webkitRequestFullscreen(); });
+</script>

Powered by Google App Engine
This is Rietveld 408576698