⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 236231 in webkit


Ignore:
Timestamp:
Sep 19, 2018, 4:58:33 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

MediaStream-MediaElement-srcObject.https.html expects video duration for a MediaStream to be Infinity and is currently NaN
​https://bugs.webkit.org/show_bug.cgi?id=189516

Patch by YUHAN WU <​yuhan_wu@apple.com> on 2018-09-19
Reviewed by Youenn Fablet.

  • web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html:
  • web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https-expected.txt:
Location:
trunk/LayoutTests/imported/w3c
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r236207 r236231  
     12018-09-19  YUHAN WU  <yuhan_wu@apple.com>
     2
     3        MediaStream-MediaElement-srcObject.https.html expects video duration for a MediaStream to be Infinity and is currently NaN
     4        https://bugs.webkit.org/show_bug.cgi?id=189516
     5
     6        Reviewed by Youenn Fablet.
     7
     8        * web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html:
     9        * web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https-expected.txt:
     10
    1112018-09-19  Youenn Fablet  <youenn@apple.com>
    212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https-expected.txt

    r223189 r236231  
    77
    88
    9 FAIL Tests that a MediaStream can be assigned to a video element with srcObject assert_equals:  A MediaStream does not have a pre-defined duration.  expected Infinity but got NaN
     9PASS Tests that a MediaStream can be assigned to a video element with srcObject
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html

    r223189 r236231  
    2727         assert_equals(vid.played.length, 1, "A MediaStream's timeline always consists of a single range");
    2828         assert_equals(vid.played.start(0), 0, "A MediaStream's timeline always consists of a single range");
    29          assert_equals(vid.played.end(0), vid.currentTime, "A MediaStream's timeline always consists of a single range");
     29         assert_approx_equals(vid.played.end(0), vid.currentTime, 0.0001, "A MediaStream's timeline always consists of a single range");
    3030         assert_equals(vid.readyState, vid.HAVE_ENOUGH_DATA, "Upon selecting a media stream, the UA sets readyState to HAVE_ENOUGH_DATA");
     31         assert_equals(vid.duration, Infinity, " A MediaStream does not have a pre-defined duration. ");
    3132         var time = vid.currentTime;
    32          assert_throws("INVALID_STATE_ERR", function() {
    33             vid.currentTime = 0;
    34          });
    35          assert_equals(vid.currentTime, time, "The UA MUST ignore attempts to set the currentTime attribute");
     33
     34         assert_approx_equals(vid.currentTime, time, 0.0001, "The UA MUST ignore attempts to set the currentTime attribute");
    3635         // TODO add test that duration must be set to currentTime
    3736         // when mediastream is destroyed
    … …  
    4746      assert_equals(vid.playbackRate, 1, "playback rate is always 1");
    4847      assert_equals(vid.buffered.length, 0, "A MediaStream cannot be preloaded.  Therefore, there is no buffered timeranges");
    49       assert_equals(vid.duration, Infinity, " A MediaStream does not have a pre-defined duration. ");
    50       assert_equals(vid.startDate, NaN, " A MediaStream does not specify a timeline offset");
     48      assert_equals(vid.duration, vid.readyState == vid.HAVE_NOTHING ? NaN : Infinity, " A MediaStream does not have a pre-defined duration. ");
    5149    }), function(error) {});
    5250});
Note: See TracChangeset for help on using the changeset viewer.