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

Unified Diff: LayoutTests/fullscreen/full-screen-twice-newapi.html

Issue 462253003: Remove early returns in fullscreen tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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-twice-newapi.html
diff --git a/LayoutTests/fullscreen/full-screen-twice-newapi.html b/LayoutTests/fullscreen/full-screen-twice-newapi.html
index c5cd6e271e3fa4ee501c49c9c03afe8f44e361f5..9a027fe4838a81bfd737ce21a1aad66258133858 100644
--- a/LayoutTests/fullscreen/full-screen-twice-newapi.html
+++ b/LayoutTests/fullscreen/full-screen-twice-newapi.html
@@ -2,49 +2,43 @@
<script src="full-screen-test.js"></script>
<span></span>
<script>
- // Bail out early if the full screen API is not enabled or is missing:
- if (Element.prototype.webkitRequestFullscreen == undefined) {
- logResult(false, "Element.prototype.webkitRequestFullscreen == undefined");
- endTest();
- } else {
- var span = document.getElementsByTagName('span')[0];
+ var span = document.getElementsByTagName('span')[0];
- var documentEnteredFullScreen = function() {
- testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
- runWithKeyDown(function(){document.documentElement.webkitRequestFullscreen()});
- waitForEvent(document, 'webkitfullscreenerror', documentDidNotReenterFullScreen, false, true);
- };
+ var documentEnteredFullScreen = function() {
+ testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
+ runWithKeyDown(function(){document.documentElement.webkitRequestFullscreen()});
+ waitForEvent(document, 'webkitfullscreenerror', documentDidNotReenterFullScreen, false, true);
+ };
- var documentDidNotReenterFullScreen = function() {
- testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
- runWithKeyDown(function(){span.webkitRequestFullscreen()});
- waitForEvent(document, 'webkitfullscreenchange', spanEnteredFullScreen, false, true);
- };
+ var documentDidNotReenterFullScreen = function() {
+ testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
+ runWithKeyDown(function(){span.webkitRequestFullscreen()});
+ waitForEvent(document, 'webkitfullscreenchange', spanEnteredFullScreen, false, true);
+ };
- var spanEnteredFullScreen = function() {
- testExpected("document.webkitCurrentFullScreenElement", span);
- runWithKeyDown(function(){span.webkitRequestFullscreen()});
- waitForEvent(document, 'webkitfullscreenerror', spanDidNotReenterFullScreen, false, true);
- };
+ var spanEnteredFullScreen = function() {
+ testExpected("document.webkitCurrentFullScreenElement", span);
+ runWithKeyDown(function(){span.webkitRequestFullscreen()});
+ waitForEvent(document, 'webkitfullscreenerror', spanDidNotReenterFullScreen, false, true);
+ };
- var spanDidNotReenterFullScreen = function() {
- testExpected("document.webkitCurrentFullScreenElement", span);
- waitForEvent(document, 'webkitfullscreenchange', spanExited, false, true);
- document.webkitExitFullscreen();
- };
+ var spanDidNotReenterFullScreen = function() {
+ testExpected("document.webkitCurrentFullScreenElement", span);
+ waitForEvent(document, 'webkitfullscreenchange', spanExited, false, true);
+ document.webkitExitFullscreen();
+ };
- var spanExited = function() {
- testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
- waitForEvent(document, 'webkitfullscreenchange', documentExited, false, true);
- document.webkitExitFullscreen();
- };
+ var spanExited = function() {
+ testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
+ waitForEvent(document, 'webkitfullscreenchange', documentExited, false, true);
+ document.webkitExitFullscreen();
+ };
- var documentExited = function() {
- testExpected("document.webkitCurrentFullScreenElement", undefined);
- endTest();
- };
+ var documentExited = function() {
+ testExpected("document.webkitCurrentFullScreenElement", undefined);
+ endTest();
+ };
- runWithKeyDown(function(){document.documentElement.webkitRequestFullscreen()});
- waitForEvent(document, 'webkitfullscreenchange', documentEnteredFullScreen, false, true);
- }
+ runWithKeyDown(function(){document.documentElement.webkitRequestFullscreen()});
+ waitForEvent(document, 'webkitfullscreenchange', documentEnteredFullScreen, false, true);
</script>
« no previous file with comments | « LayoutTests/fullscreen/full-screen-twice.html ('k') | LayoutTests/fullscreen/full-screen-with-flex-item.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698