2011-01-08 Eric Seidel <eric@webkit.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Jan 2011 22:17:54 +0000 (22:17 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Jan 2011 22:17:54 +0000 (22:17 +0000)
        Unreviewed.

        Implement WebKit Full Screen support
        https://bugs.webkit.org/show_bug.cgi?id=49481

        Check in failing results for these tests to allow the bots to roll green.

        * fullscreen/full-screen-remove-ancestor-expected.txt:
        * fullscreen/full-screen-remove-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@75326 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fullscreen/full-screen-remove-ancestor-expected.txt
LayoutTests/fullscreen/full-screen-remove-expected.txt

index c015c65..6fc21b0 100644 (file)
@@ -1,3 +1,15 @@
+2011-01-08  Eric Seidel  <eric@webkit.org>
+
+        Unreviewed.
+
+        Implement WebKit Full Screen support
+        https://bugs.webkit.org/show_bug.cgi?id=49481
+
+        Check in failing results for these tests to allow the bots to roll green.
+
+        * fullscreen/full-screen-remove-ancestor-expected.txt:
+        * fullscreen/full-screen-remove-expected.txt:
+
 2011-01-08  Mihai Parparita  <mihaip@chromium.org>
 
         Unreviewed; chromium test expectations update.
index d9a0ab3..70479f3 100644 (file)
@@ -1,6 +1,42 @@
+
 EVENT(webkitfullscreenchange)
 EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLElement]') OK
 EVENT(webkitfullscreenchange)
 EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLHtmlElement]') OK
 END OF TEST
 
+
+
+    // 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 span = document.getElementsByTagName('span')[0];
+        var div = span.parentNode;
+
+        var spanEnteredFullScreen = function(event) {
+            callback = documentEnteredFullScreen;
+            testExpected("document.webkitCurrentFullScreenElement", span);
+            document.body.removeChild(div);
+        };
+
+        var documentEnteredFullScreen = function(event) {
+            callback = null;
+            testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
+            endTest();
+        };
+
+        callback = spanEnteredFullScreen;
+        span.webkitRequestFullScreen();
+    }
+
+
index d9a0ab3..8dc2714 100644 (file)
@@ -1,6 +1,41 @@
+
 EVENT(webkitfullscreenchange)
 EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLElement]') OK
 EVENT(webkitfullscreenchange)
 EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLHtmlElement]') OK
 END OF TEST
 
+
+
+    // 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 span = document.getElementsByTagName('span')[0];
+    
+        var spanEnteredFullScreen = function(event) {
+            callback = documentEnteredFullScreen;
+            testExpected("document.webkitCurrentFullScreenElement", span);
+            span.parentNode.removeChild(span);
+        };
+    
+        var documentEnteredFullScreen = function(event) {
+            callback = null;
+            testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
+            endTest();
+        };
+    
+        callback = spanEnteredFullScreen;
+        span.webkitRequestFullScreen();
+    }
+
+