Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fullscreen / full-screen-element-stack.html
blob53a213b40b09bdd2f1bd48d6f55d61ad18113dec
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="full-screen-test.js"></script>
5 <script>
6 var one;
7 var two;
9 function runTest() {
10 one = document.getElementById('one');
11 two = document.getElementById('two');
13 var callback;
14 var fullscreenChanged = function(event) {
15 if (callback)
16 callback(event)
18 waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
20 var oneEnteredFullscreen = function() {
21 testExpected("document.webkitFullscreenElement.id", "one");
22 callback = twoEnteredFullscreen;
23 if (window.testRunner)
24 runWithKeyDown(function() { two.webkitRequestFullscreen(); });
27 var twoEnteredFullscreen = function() {
28 testExpected("document.webkitFullscreenElement.id", "two");
29 callback = twoExitedFullscreen;
30 if (window.testRunner)
31 document.webkitExitFullscreen();
34 var twoExitedFullscreen = function() {
35 testExpected("document.webkitFullscreenElement.id", "one");
36 endTest();
39 callback = oneEnteredFullscreen;
40 if (window.testRunner)
41 runWithKeyDown(function() { one.webkitRequestFullscreen(); });
43 </script>
44 </head>
45 <body onload="runTest()">
46 <p>Test for <a href="http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#fullscreen-element-stack">W3C Fullscreen element stack</a>.</p>
47 <p>To test manually, click the "Go full screen" button - the page should enter full screen mode.</p>
48 <div>
49 <button onclick="one.webkitRequestFullscreen()">Go full screen (one)</button>
50 </div>
51 <div id=one>
52 <button onclick="two.webkitRequestFullscreen()">Go full screen (two)</button>
53 <div id=two>
54 <button onclick="document.webkitExitFullscreen()">Exit full screen (two)</button>
55 </div>
56 </div>
57 </body>