Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fullscreen / full-screen-cancel.html
blobd71f5d9bf87f8fbc31a8efec5e30420056fa0272
1 <body>
2 <script src="full-screen-test.js"></script>
3 <span></span>
4 <script>
5 var callback;
6 var fullscreenChanged = function(event)
8 if (callback)
9 callback(event)
11 waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
13 var span = document.getElementsByTagName('span')[0];
15 var spanEnteredFullScreen = function() {
16 testExpected("document.webkitIsFullScreen", true);
17 testExpected("document.webkitCurrentFullScreenElement", span);
18 callback = cancelledFullScreen;
19 document.webkitCancelFullScreen();
22 var cancelledFullScreen = function() {
23 testExpected("document.webkitIsFullScreen", false);
24 testExpected("document.webkitCurrentFullScreenElement", undefined);
25 callback = failFullScreenTest;
26 document.webkitCancelFullScreen();
27 setTimeout(endTest, 0);
30 var failFullScreenTest = function() {
31 consoleWrite("Should not have received a webkitfullscreenchange event.");
32 endTest();
35 callback = spanEnteredFullScreen;
36 runWithKeyDown(function(){span.webkitRequestFullScreen()});
37 </script>