Changeset 80820 in webkit


Ignore:
Timestamp:
Mar 10, 2011 11:13:50 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-03-10 Ami Fischman <fischman@google.com>

Reviewed by David Levin.

video-controls-in-media-document.html used to silently rely on
timeupdate firing immediately upon playback start, and before any
frames changed. This was (unsurprisingly, in retrospect)
super-brittle. This change instead uses an explicit seek to put
the video in a predictable state. The expected.png change is only to
change the "pause" button to "play" (which is part of what's
required to have the video be in a predictable state for the pixel
diff). An equivalent rebaselining needs to happen for chromium
mac & win.

  • media/video-controls-in-media-document.html:
  • platform/chromium/media/video-controls-in-media-document-expected.checksum:
  • platform/chromium/media/video-controls-in-media-document-expected.png:
  • platform/chromium/test_expectations.txt:
Location:
trunk/LayoutTests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r80819 r80820  
     12011-03-10  Ami Fischman  <fischman@google.com>
     2
     3        Reviewed by David Levin.
     4
     5        video-controls-in-media-document.html used to silently rely on
     6        timeupdate firing immediately upon playback start, and before any
     7        frames changed.  This was (unsurprisingly, in retrospect)
     8        super-brittle.  This change instead uses an explicit seek to put
     9        the video in a predictable state.  The expected.png change is only to
     10        change the "pause" button to "play" (which is part of what's
     11        required to have the video be in a predictable state for the pixel
     12        diff).  An equivalent rebaselining needs to happen for chromium
     13        mac & win.
     14
     15        * media/video-controls-in-media-document.html:
     16        * platform/chromium/media/video-controls-in-media-document-expected.checksum:
     17        * platform/chromium/media/video-controls-in-media-document-expected.png:
     18        * platform/chromium/test_expectations.txt:
     19
    1202011-03-10  Roland Steiner  <rolandsteiner@chromium.org>
    221
  • trunk/LayoutTests/media/video-controls-in-media-document.html

    r79630 r80820  
    66
    77<script type="text/javascript">
     8if (window.layoutTestController)
     9    layoutTestController.waitUntilDone();
     10
    811var iframe = document.getElementById("container");
    9 layoutTestController.waitUntilDone();
    1012
    11 function finish() { layoutTestController.notifyDone(); };
     13function finish() {
     14    // Sadly, "seeked" fires before the canvas is fully repainted or the controls
     15    // finish "fading in", so we have to insert an artificial delay before exiting
     16    // the test.
     17    if (window.layoutTestController)
     18        setTimeout("layoutTestController.notifyDone();", 100);
     19};
     20
     21function timeupdate(event) {
     22    var video = event.target;
     23    video.addEventListener("seeked", finish);
     24    // In order to get a predictable image (for pixels expectation) we seek to
     25    // time 0.  A simpler and more robust test would simply inspect the height of
     26    // the rendered video+controls but the controls are part of the shadow DOM and
     27    // are not reachable from JS (not even in DumpRenderTree).
     28    video.pause();
     29    video.currentTime = 0;
     30};
    1231
    1332function start() {
    1433    var iframeDocument = document.getElementById("container").contentDocument;
    1534    var video = iframeDocument.querySelector("video");
    16     video.addEventListener("timeupdate", finish);
     35    video.addEventListener("timeupdate", timeupdate);
    1736};
    1837
  • trunk/LayoutTests/platform/chromium/media/video-controls-in-media-document-expected.checksum

    r78680 r80820  
    1 78e82614917ae67a43fe567eed8d6fad
     1d174a5ce26a60595b7630715a0ab2077
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r80819 r80820  
    32203220BUGV8_1228 : fast/js/preventExtensions.html = TEXT
    32213221
    3222 BUGWK54634 : media/video-controls-in-media-document.html = IMAGE+TEXT
     3222BUGWK54634 WIN MAC : media/video-controls-in-media-document.html = IMAGE+TEXT
    32233223
    32243224BUGWK54659 DEBUG : inspector/debugger/debug-inlined-scripts.html = TEXT CRASH TIMEOUT
Note: See TracChangeset for help on using the changeset viewer.