mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision e426a6933a05bf144eba06a1d4c47ba876a4e2d1
This commit is contained in:
parent
415b26e4f1
commit
5e5eccabf8
495 changed files with 14920 additions and 784 deletions
|
@ -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?");
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue