зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1298307 - Change the cue's startTime/endTime to avoid the videoframe was not created. r=alwu
Because the nsVideoFrame's creation is not synchronous to "append to dom tree", there is a small gap that the TextTrackManager wants to render cue but no frame. Change the testcase to not hit the period. MozReview-Commit-ID: 9xhMjRJnoDR
This commit is contained in:
Родитель
a2e96d0054
Коммит
d6f6f61eed
|
@ -48,6 +48,10 @@ function runTest() {
|
|||
checkCueEvents();
|
||||
}
|
||||
|
||||
video.onloadedmetadata = function () {
|
||||
ok(video.duration > 2, "video.duration should larger than 2");
|
||||
}
|
||||
|
||||
info("--- create the type of track ---");
|
||||
isnot(window.TextTrack, undefined, "TextTrack should be defined.");
|
||||
|
||||
|
@ -59,7 +63,7 @@ function runTest() {
|
|||
isnot(window.TextTrackCue, undefined, "TextTrackCue should be defined.");
|
||||
isnot(window.VTTCue, undefined, "VTTCue should be defined.");
|
||||
|
||||
var cue = new VTTCue(0, 1, "Test cue");
|
||||
var cue = new VTTCue(1, 2, "Test cue");
|
||||
ok(cue instanceof TextTrackCue, "Cue should be an instanceof TextTrackCue.");
|
||||
ok(cue instanceof VTTCue, "Cue should be an instanceof VTTCue.");
|
||||
|
||||
|
@ -76,7 +80,7 @@ function runTest() {
|
|||
if (cueChrome.getActive) {
|
||||
checkCueDisplayState(cue, true /* has display-state */);
|
||||
} else {
|
||||
ok(false, "The cue start time is 0, should be always active!?");
|
||||
info("This is a missing cue, video.currentTime is "+ video.currentTime);
|
||||
}
|
||||
|
||||
cue.onexit = function () {
|
||||
|
|
Загрузка…
Ссылка в новой задаче