Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fullscreen / full-screen-css.html
blob2029437a11268f1f557a7d6e9a078662f9da92b9
1 <body>
2 <script src="full-screen-test.js"></script>
3 <style>
4 :-webkit-full-screen { background: lime; }
5 :-webkit-full-screen-ancestor { color: blue; }
6 :root:-webkit-full-screen-ancestor { background: red; }
7 </style>
8 <span></span>
9 <script>
10 var callback;
11 var fullscreenChanged = function(event)
13 if (callback)
14 callback(event)
16 waitForEvent(document, "webkitfullscreenchange", fullscreenChanged);
18 var span = document.getElementsByTagName("span")[0];
20 testExpected("document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color')", "rgba(0, 0, 0, 0)");
21 testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgba(0, 0, 0, 0)");
22 testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 0)");
24 var documentEnteredFullScreen = function(event) {
25 testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
26 testExpected("document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color')", "rgba(0, 0, 0, 0)");
27 testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgb(0, 255, 0)");
28 testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 0)");
29 callback = spanEnteredFullScreen;
30 runWithKeyDown(function(){span.webkitRequestFullScreen()});
33 var spanEnteredFullScreen = function(event) {
34 testExpected("document.webkitCurrentFullScreenElement", span);
35 testExpected("document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color')", "rgb(0, 255, 0)");
36 testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgb(255, 0, 0)");
37 testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 255)");
38 endTest();
41 callback = documentEnteredFullScreen;
42 runWithKeyDown(function(){document.documentElement.webkitRequestFullScreen()});
43 </script>