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

Unified Diff: LayoutTests/fullscreen/full-screen-with-flex-item.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-with-flex-item.html
diff --git a/LayoutTests/fullscreen/full-screen-with-flex-item.html b/LayoutTests/fullscreen/full-screen-with-flex-item.html
index f809e7295496225292dfc9bae2ca9ec8e71326c4..a5a63d4443190e23eb3567e89f9f3fe39f0da355 100644
--- a/LayoutTests/fullscreen/full-screen-with-flex-item.html
+++ b/LayoutTests/fullscreen/full-screen-with-flex-item.html
@@ -23,36 +23,30 @@
<div class="inner">Number 4</div>
</div></div>
<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 callback;
- var fullscreenChanged = function(event)
- {
- if (callback)
- callback(event)
- };
- waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
+ var callback;
+ var fullscreenChanged = function(event)
+ {
+ if (callback)
+ callback(event)
+ };
+ waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
- var div = document.getElementsByTagName('div')[0];
- var oldHeight = div.offsetHeight;
+ var div = document.getElementsByTagName('div')[0];
+ var oldHeight = div.offsetHeight;
- var divEnteredFullScreen = function(event) {
- callback = divExitedFullScreen;
- document.webkitExitFullscreen();
- };
+ var divEnteredFullScreen = function(event) {
+ callback = divExitedFullScreen;
+ document.webkitExitFullscreen();
+ };
- var divExitedFullScreen = function(event) {
- callback = null;
- testExpected(div.offsetHeight, oldHeight);
- div.innerHTML = ""; // simplify the text dump
- endTest();
- };
+ var divExitedFullScreen = function(event) {
+ callback = null;
+ testExpected(div.offsetHeight, oldHeight);
+ div.innerHTML = ""; // simplify the text dump
+ endTest();
+ };
- callback = divEnteredFullScreen;
- runWithKeyDown(function(){div.webkitRequestFullScreen()});
- }
+ callback = divEnteredFullScreen;
+ runWithKeyDown(function(){div.webkitRequestFullScreen()});
</script>
<button onclick="div.webkitRequestFullScreen()">Enter Fullscreen</button>
« no previous file with comments | « LayoutTests/fullscreen/full-screen-twice-newapi.html ('k') | LayoutTests/fullscreen/full-screen-zIndex.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698