Automatic update from web-platform-testsMerge pull request #13084 from woaiwyhty/wpt-export-for-webkit-189516

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=189516
--

wpt-commits: 3400b268f2e87316c86a0efefdb474f6fadc1a3a
wpt-pr: 13084
This commit is contained in:
youennf 2018-09-24 10:23:05 +00:00 коммит произвёл moz-wptsync-bot
Родитель 8cedbd78ef
Коммит 1e4d21b613
2 изменённых файлов: 6 добавлений и 8 удалений

Просмотреть файл

@ -621161,7 +621161,7 @@
"manual"
],
"mediacapture-streams/MediaStream-MediaElement-srcObject.https.html": [
"63442bea25b34cda8814a22dc1e90a7871b4a0b9",
"2ed96ec386c23c019791c8306d7d81cd4b3af920",
"testharness"
],
"mediacapture-streams/MediaStream-add-audio-track.https.html": [

Просмотреть файл

@ -26,13 +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(vid.played.end(0), vid.currentTime, "A MediaStream's timeline always consists of a single range");
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_throws("INVALID_STATE_ERR", function() {
vid.currentTime = 0;
});
assert_equals(vid.currentTime, time, "The UA MUST ignore attempts to set the currentTime attribute");
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);
@ -46,8 +45,7 @@ t.step(function() {
assert_equals(vid.defaultPlaybackRate, 1, "playback rate is always 1");
assert_equals(vid.playbackRate, 1, "playback rate is always 1");
assert_equals(vid.buffered.length, 0, "A MediaStream cannot be preloaded. Therefore, there is no buffered timeranges");
assert_equals(vid.duration, Infinity, " A MediaStream does not have a pre-defined duration. ");
assert_equals(vid.startDate, NaN, " A MediaStream does not specify a timeline offset");
assert_equals(vid.duration, vid.readyState == vid.HAVE_NOTHING ? NaN : Infinity, " A MediaStream does not have a pre-defined duration. ");
}), function(error) {});
});
</script>