Changeset 75326 in webkit


Ignore:
Timestamp:
Jan 8, 2011 2:17:54 PM (13 years ago)
Author:
eric@webkit.org
Message:

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:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r75322 r75326  
     12011-01-08  Eric Seidel  <eric@webkit.org>
     2
     3        Unreviewed.
     4
     5        Implement WebKit Full Screen support
     6        https://bugs.webkit.org/show_bug.cgi?id=49481
     7
     8        Check in failing results for these tests to allow the bots to roll green.
     9
     10        * fullscreen/full-screen-remove-ancestor-expected.txt:
     11        * fullscreen/full-screen-remove-expected.txt:
     12
    1132011-01-08  Mihai Parparita  <mihaip@chromium.org>
    214
  • trunk/LayoutTests/fullscreen/full-screen-remove-ancestor-expected.txt

    r66251 r75326  
     1
    12EVENT(webkitfullscreenchange)
    23EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLElement]') OK
     
    56END OF TEST
    67
     8
     9
     10    // Bail out early if the full screen API is not enabled or is missing:
     11    if (Element.prototype.webkitRequestFullScreen == undefined) {
     12        logResult(false, "Element.prototype.webkitRequestFullScreen == undefined");
     13        endTest();
     14    } else {
     15        var callback;
     16        var fullscreenChanged = function(event)
     17        {
     18            if (callback)
     19                callback(event)
     20        };
     21        waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
     22
     23        var span = document.getElementsByTagName('span')[0];
     24        var div = span.parentNode;
     25
     26        var spanEnteredFullScreen = function(event) {
     27            callback = documentEnteredFullScreen;
     28            testExpected("document.webkitCurrentFullScreenElement", span);
     29            document.body.removeChild(div);
     30        };
     31
     32        var documentEnteredFullScreen = function(event) {
     33            callback = null;
     34            testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
     35            endTest();
     36        };
     37
     38        callback = spanEnteredFullScreen;
     39        span.webkitRequestFullScreen();
     40    }
     41
     42
  • trunk/LayoutTests/fullscreen/full-screen-remove-expected.txt

    r66251 r75326  
     1
    12EVENT(webkitfullscreenchange)
    23EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLElement]') OK
     
    56END OF TEST
    67
     8
     9
     10    // Bail out early if the full screen API is not enabled or is missing:
     11    if (Element.prototype.webkitRequestFullScreen == undefined) {
     12        logResult(false, "Element.prototype.webkitRequestFullScreen == undefined");
     13        endTest();
     14    } else {
     15        var callback;
     16        var fullscreenChanged = function(event)
     17        {
     18            if (callback)
     19                callback(event)
     20        };
     21        waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
     22   
     23        var span = document.getElementsByTagName('span')[0];
     24   
     25        var spanEnteredFullScreen = function(event) {
     26            callback = documentEnteredFullScreen;
     27            testExpected("document.webkitCurrentFullScreenElement", span);
     28            span.parentNode.removeChild(span);
     29        };
     30   
     31        var documentEnteredFullScreen = function(event) {
     32            callback = null;
     33            testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
     34            endTest();
     35        };
     36   
     37        callback = spanEnteredFullScreen;
     38        span.webkitRequestFullScreen();
     39    }
     40
     41
Note: See TracChangeset for help on using the changeset viewer.