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

Side by Side Diff: LayoutTests/fullscreen/full-screen-exit-when-popup.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <body> 1 <body>
2 <script src="full-screen-test.js"></script> 2 <script src="full-screen-test.js"></script>
3 <span></span> 3 <span></span>
4 <script> 4 <script>
5 // Bail out early if the full screen API is not enabled or is missing: 5 if (window.testRunner) {
6 if (Element.prototype.webkitRequestFullScreen == undefined) { 6 testRunner.setCanOpenWindows(true);
7 logResult(false, "Element.prototype.webkitRequestFullScreen == undefined "); 7 testRunner.setCloseRemainingWindowsWhenComplete(true);
8 }
9 var callback;
10 var fullscreenChanged = function(event)
11 {
12 if (callback)
13 callback(event)
14 };
15 waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
16
17 var spanEnteredFullScreen = function() {
18 testExpected("document.webkitIsFullScreen", true);
19 testExpected("document.webkitCurrentFullScreenElement", span);
20 callback = cancelledFullScreen;
21 testExpected("window.open('about:blank')", null, "!=");
22 };
23
24 var cancelledFullScreen = function() {
25 testExpected("document.webkitIsFullScreen", false);
26 testExpected("document.webkitCurrentFullScreenElement", undefined);
8 endTest(); 27 endTest();
9 } else { 28 };
10 if (window.testRunner) {
11 testRunner.setCanOpenWindows(true);
12 testRunner.setCloseRemainingWindowsWhenComplete(true);
13 }
14 var callback;
15 var fullscreenChanged = function(event)
16 {
17 if (callback)
18 callback(event)
19 };
20 waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
21 29
22 var spanEnteredFullScreen = function() { 30 var span = document.getElementsByTagName('span')[0];
23 testExpected("document.webkitIsFullScreen", true);
24 testExpected("document.webkitCurrentFullScreenElement", span);
25 callback = cancelledFullScreen;
26 testExpected("window.open('about:blank')", null, "!=");
27 };
28 31
29 var cancelledFullScreen = function() { 32 callback = spanEnteredFullScreen;
30 testExpected("document.webkitIsFullScreen", false); 33 runWithKeyDown(function(){span.webkitRequestFullScreen()});
31 testExpected("document.webkitCurrentFullScreenElement", undefined);
32 endTest();
33 };
34
35 var span = document.getElementsByTagName('span')[0];
36
37 callback = spanEnteredFullScreen;
38 runWithKeyDown(function(){span.webkitRequestFullScreen()});
39 }
40 </script> 34 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fullscreen/full-screen-css.html ('k') | LayoutTests/fullscreen/full-screen-fixed-pos-parent.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698