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

Side by Side Diff: LayoutTests/fullscreen/full-screen-remove.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 <div><span></span></div> 3 <div><span></span></div>
4 <script> 4 <script>
5 // Bail out early if the full screen API is not enabled or is missing: 5 var callback;
6 if (Element.prototype.webkitRequestFullScreen == undefined) { 6 var fullscreenChanged = function(event)
7 logResult(false, "Element.prototype.webkitRequestFullScreen == undefined "); 7 {
8 if (callback)
9 callback(event)
10 };
11 waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
12
13 var span = document.getElementsByTagName('span')[0];
14
15 var spanEnteredFullScreen = function(event) {
16 callback = spanExitedFullScreen;
17 testExpected("document.webkitCurrentFullScreenElement", span);
18 span.parentNode.removeChild(span);
19 };
20
21 var spanExitedFullScreen = function(event) {
22 callback = null;
23 testExpected("document.webkitCurrentFullScreenElement", null);
8 endTest(); 24 endTest();
9 } else { 25 };
10 var callback; 26
11 var fullscreenChanged = function(event) 27 callback = spanEnteredFullScreen;
12 { 28 runWithKeyDown(function(){span.webkitRequestFullScreen()});
13 if (callback)
14 callback(event)
15 };
16 waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
17
18 var span = document.getElementsByTagName('span')[0];
19
20 var spanEnteredFullScreen = function(event) {
21 callback = spanExitedFullScreen;
22 testExpected("document.webkitCurrentFullScreenElement", span);
23 span.parentNode.removeChild(span);
24 };
25
26 var spanExitedFullScreen = function(event) {
27 callback = null;
28 testExpected("document.webkitCurrentFullScreenElement", null);
29 endTest();
30 };
31
32 callback = spanEnteredFullScreen;
33 runWithKeyDown(function(){span.webkitRequestFullScreen()});
34 }
35 </script> 29 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fullscreen/full-screen-placeholder.html ('k') | LayoutTests/fullscreen/full-screen-remove-ancestor.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698