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

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

Powered by Google App Engine
This is Rietveld 408576698