</style>
<span></span>
<script>
- // Bail out early if the full screen API is not enabled or is missing:
- if (Element.prototype.webkitRequestFullScreen == undefined) {
- logResult(false, "Element.prototype.webkitRequestFullScreen == undefined");
- endTest();
- } else {
- var callback;
- var fullscreenChanged = function(event)
- {
- if (callback)
- callback(event)
- };
- waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
+ var callback;
+ var fullscreenChanged = function(event)
+ {
+ if (callback)
+ callback(event)
+ };
+ waitForEvent(document, "webkitfullscreenchange", fullscreenChanged);
+
+ var span = document.getElementsByTagName("span")[0];
+
+ testExpected("document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color')", "rgba(0, 0, 0, 0)");
+ testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgba(0, 0, 0, 0)");
+ testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 0)");
- var span = document.getElementsByTagName('span')[0];
-
+ var documentEnteredFullScreen = function(event) {
+ testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
testExpected("document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color')", "rgba(0, 0, 0, 0)");
- testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgba(0, 0, 0, 0)");
- testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 0)");
-
- var spanEnteredFullScreen = function(event) {
- testExpected("document.webkitCurrentFullScreenElement", span);
- testExpected("document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color')", "rgb(0, 255, 0)");
- testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgb(255, 0, 0)");
- testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 255)");
-
- callback = documentEnteredFullScreen;
- runWithKeyDown(function(){document.documentElement.webkitRequestFullScreen()});
- };
-
- var documentEnteredFullScreen = function(event) {
- testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
- testExpected("document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color')", "rgba(0, 0, 0, 0)");
- testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgb(0, 255, 0)");
- testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 255)");
- endTest();
- };
-
+ testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgb(0, 255, 0)");
+ testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 255)");
callback = spanEnteredFullScreen;
runWithKeyDown(function(){span.webkitRequestFullScreen()});
- }
+ };
+
+ var spanEnteredFullScreen = function(event) {
+ testExpected("document.webkitCurrentFullScreenElement", span);
+ testExpected("document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color')", "rgb(0, 255, 0)");
+ testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgb(255, 0, 0)");
+ testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 255)");
+ endTest();
+ };
+
+ callback = documentEnteredFullScreen;
+ runWithKeyDown(function(){document.documentElement.webkitRequestFullScreen()});
</script>