Index: LayoutTests/fullscreen/full-screen-unprefixed-and-prefixed.html |
diff --git a/LayoutTests/fullscreen/full-screen-unprefixed-and-prefixed.html b/LayoutTests/fullscreen/full-screen-unprefixed-and-prefixed.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5c9376cbb3b816035be9e495a33afed53be50fc7 |
--- /dev/null |
+++ b/LayoutTests/fullscreen/full-screen-unprefixed-and-prefixed.html |
@@ -0,0 +1,51 @@ |
+<!DOCTYPE html> |
+<title>Mixed unprefixed and prefixed 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.webkitRequestFullscreen(); }); |
+} |
+ |
+function spanEnteredFullscreen() |
+{ |
+ testExpected("document.fullscreenElement", span); |
+ testExpected("document.webkitFullscreenElement", span); |
+ callback = spanExitedFullscreen; |
+ document.exitFullscreen(); |
+} |
+ |
+function spanExitedFullscreen() |
+{ |
+ testExpected("document.fullscreenElement", div); |
+ testExpected("document.webkitFullscreenElement", div); |
+ callback = divExitedFullscreen; |
+ document.exitFullscreen(); |
+} |
+ |
+function divExitedFullscreen() |
+{ |
+ testExpected("document.fullscreenElement", null); |
+ testExpected("document.webkitFullscreenElement", null); |
+ endTest(); |
+} |
+ |
+callback = divEnteredFullscreen; |
+runWithKeyDown(function() { div.requestFullscreen(); }); |
+</script> |