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

Side by Side Diff: LayoutTests/fullscreen/full-screen-cancel-nested.html

Issue 434903002: Make webkitCancelFullScreen() an alias of webkitExitFullscreen() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: polish test 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
« no previous file with comments | « no previous file | LayoutTests/fullscreen/full-screen-cancel-nested-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="full-screen-test.js"></script>
3 <p>Test that webkitCancelFullScreen only exits one level of fullscreen</p>
4 <div><span></span></div>
5 <script>
6 // Bail out early if the full screen API is not enabled or is missing:
7 if (Element.prototype.webkitRequestFullScreen == undefined) {
8 logResult(false, "Element.prototype.webkitRequestFullScreen == undefined ");
9 endTest();
10 } else {
11 var callback;
12 function fullscreenChanged(event)
13 {
14 if (callback)
15 callback(event)
16 };
17 waitForEvent(document, "webkitfullscreenchange", fullscreenChanged);
18
19 var div = document.querySelector("div");
20 function divEnteredFullScreen()
21 {
22 testExpected("document.webkitCurrentFullScreenElement", div);
23 callback = spanEnteredFullScreen;
24 runWithKeyDown(function() { span.webkitRequestFullScreen(); });
25 };
26
27 var span = document.querySelector("span");
28 function spanEnteredFullScreen()
29 {
30 testExpected("document.webkitCurrentFullScreenElement", span);
31 callback = cancelledFullScreen;
32 document.webkitCancelFullScreen();
33 };
34
35 function cancelledFullScreen()
36 {
37 testExpected("document.webkitCurrentFullScreenElement", div);
38 endTest();
39 };
40
41 callback = divEnteredFullScreen;
42 runWithKeyDown(function() { div.webkitRequestFullScreen(); });
43 }
44 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fullscreen/full-screen-cancel-nested-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698