WebKit Bugzilla
Attachment 349966 Details for
Bug 189516
: MediaStream-MediaElement-srcObject.https.html expects video duration for a MediaStream to be Infinity and is currently NaN
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189516-20180917161159.patch (text/plain), 3.46 KB, created by
Wendy
on 2018-09-17 16:12:00 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wendy
Created:
2018-09-17 16:12:00 PDT
Size:
3.46 KB
patch
obsolete
>Subversion Revision: 235907 >diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html >index eb801b86fc6441631e1f2d9e7647f51bce433f19..00dfbe6f811fd5c817a20d4187c293928ae13a74 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html >@@ -26,12 +26,12 @@ t.step(function() { > var testOncePlaying = function() { > assert_equals(vid.played.length, 1, "A MediaStream's timeline always consists of a single range"); > assert_equals(vid.played.start(0), 0, "A MediaStream's timeline always consists of a single range"); >- assert_equals_epsilon(vid.played.end(0), vid.currentTime, "A MediaStream's timeline always consists of a single range", 0.0001); >+ assert_approx_equals(vid.played.end(0), vid.currentTime, 0.0001, "A MediaStream's timeline always consists of a single range"); > assert_equals(vid.readyState, vid.HAVE_ENOUGH_DATA, "Upon selecting a media stream, the UA sets readyState to HAVE_ENOUGH_DATA"); > assert_equals(vid.duration, Infinity, " A MediaStream does not have a pre-defined duration. "); > var time = vid.currentTime; > >- assert_equals_epsilon(vid.currentTime, time, "The UA MUST ignore attempts to set the currentTime attribute", 0.0001); >+ assert_approx_equals(vid.currentTime, time, 0.0001, "The UA MUST ignore attempts to set the currentTime attribute"); > // TODO add test that duration must be set to currentTime > // when mediastream is destroyed > vid.removeEventListener("timeupdate", testOncePlaying, false); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/testharness.js b/LayoutTests/imported/w3c/web-platform-tests/resources/testharness.js >index 567c3c30f1ac9c2580d9a0cf131165a6f1b7a4ee..aa0d907559b6978cf4253b4323b1ba26dd4f1937 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/testharness.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/testharness.js >@@ -923,32 +923,6 @@ policies and contribution forms [3]. > return x === y; > } > >- function same_value_float(x, y, epsilon) { >- if (y !== y) { >- // NaN case >- return x !== x; >- } >- return Math.abs(x - y) < epsilon; >- } >- >- function assert_equals_epsilon(actual, expected, description, epsilon) >- { >- /* >- * Test if two floats are equal (under a certain epsilon) or two objects >- * are the same object >- */ >- if (typeof actual != typeof expected) { >- assert(false, "assert_equals", description, >- "expected (" + typeof expected + ") ${expected} but got (" + typeof actual + ") ${actual}", >- {expected:expected, actual:actual}); >- return; >- } >- assert(same_value_float(actual, expected, epsilon), "assert_equals_epsilon", description, >- "expected ${expected} but got ${actual}", >- {expected:expected, actual:actual}); >- } >- expose(assert_equals_epsilon, "assert_equals_epsilon"); >- > function assert_equals(actual, expected, description) > { > /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189516
:
349938
|
349940
|
349948
|
349962
|
349963
|
349965
|
349966
|
349968
|
349972
|
349985
|
349989
|
350044
|
350084
|
350135