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

Side by Side Diff: LayoutTests/fullscreen/full-screen-prefixed-and-unprefixed.html

Issue 395633011: Implement the unprefixed the Fullscreen API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nits 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
(Empty)
1 <!DOCTYPE html>
2 <title>Mixed prefixed and unprefixed requests</title>
3 <script src="full-screen-test.js"></script>
4 <div><span></span></div>
5 <script>
6 var callback;
7 function fullscreenChanged(event)
8 {
9 if (callback)
10 callback(event)
11 }
12 waitForEvent(document, "fullscreenchange", fullscreenChanged);
13 waitForEvent(document, "webkitfullscreenchange", fullscreenChanged);
14
15 var div = document.querySelector("div");
16 var span = document.querySelector("span");
17
18 function divEnteredFullscreen()
19 {
20 testExpected("document.fullscreenElement", div);
21 testExpected("document.webkitFullscreenElement", div);
22 callback = spanEnteredFullscreen;
23 runWithKeyDown(function() { span.requestFullscreen(); });
24 }
25
26 function spanEnteredFullscreen()
27 {
28 testExpected("document.fullscreenElement", span);
29 testExpected("document.webkitFullscreenElement", span);
30 callback = spanExitedFullscreen;
31 document.webkitExitFullscreen();
32 }
33
34 function spanExitedFullscreen()
35 {
36 testExpected("document.fullscreenElement", div);
37 testExpected("document.webkitFullscreenElement", div);
38 callback = divExitedFullscreen;
39 document.webkitExitFullscreen();
40 }
41
42 function divExitedFullscreen()
43 {
44 testExpected("document.fullscreenElement", null);
45 testExpected("document.webkitFullscreenElement", null);
46 endTest();
47 }
48
49 callback = divEnteredFullscreen;
50 runWithKeyDown(function() { div.webkitRequestFullscreen(); });
51 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698