Update web-platform-tests to revision e426a6933a05bf144eba06a1d4c47ba876a4e2d1

This commit is contained in:
WPT Sync Bot 2019-05-22 10:24:35 +00:00
parent 415b26e4f1
commit 5e5eccabf8
495 changed files with 14920 additions and 784 deletions

View file

@ -15,7 +15,7 @@ async_test(function(t) {
assert_equals(cues[1].startTime, 31);
assert_equals(cues[2].startTime, 61);
assert_equals(cues.getCueById("4").startTime, 121);
assert_object_equals(cues.getCueById("junk"), undefined);
assert_equals(cues.getCueById("junk"), null);
// Create a new cue, check values.
var textCue = new VTTCue(33, 3.4, "Sausage?");

View file

@ -13,7 +13,7 @@ async_test(function(t) {
// Register the 'addtrack' listener after creating the element
// to make sure the event is dispatched asynchronously.
video.textTracks.onaddtrack = t.step_func(function() {
video.textTracks.onaddtrack = t.step_func(function(event) {
assert_equals(event.target, video.textTracks);
assert_true(event instanceof TrackEvent, 'instanceof');
assert_equals(event.track, tracks[video.textTracks.length - 1]);
@ -31,4 +31,4 @@ async_test(function(t) {
assert_equals(video.textTracks.length, 1);
assert_equals(trackElement.readyState, HTMLTrackElement.NONE);
});
</script>
</script>

View file

@ -34,13 +34,21 @@
video.src = getVideoURI("/media/test");
video.play();
// Wait for end of first cue (no events should fire while track is disabled).
t.step_timeout(testHiddenAndShowing, 400);
video.ontimeupdate = () => {
if (video.currentTime > 0.4) {
testHiddenAndShowing();
video.ontimeupdate = null;
}
}
}
track.oncuechange = t.step_func(function(event) {
cueCount++;
if (cueCount == textTrack.cues.length)
// As the 'enter' and the 'exit' event would be fired for the second
// and the third cue, so there would be 4 times 'oncuechange' event.
if (cueCount == 4)
t.done();
});