зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1550442 - check track's ready state in the beginning of the test. r=baku
If the track has already finished loading, we can directly run `trackLoaded()`. Differential Revision: https://phabricator.services.mozilla.com/D37953 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0ba66c379f
Коммит
053cbe10fb
|
@ -9,7 +9,13 @@
|
|||
async_test(function(t) {
|
||||
var video = document.querySelector("video");
|
||||
var track = document.querySelector("track");
|
||||
track.onload = t.step_func(trackLoaded);
|
||||
if (track.readyState != HTMLTrackElement.LOADED) {
|
||||
assert_not_equals(track.readyState, HTMLTrackElement.ERROR,
|
||||
"track failed to load resource.");
|
||||
track.onload = t.step_func(trackLoaded);
|
||||
} else {
|
||||
trackLoaded();
|
||||
}
|
||||
|
||||
var cueCount = 0;
|
||||
var textTrack;
|
||||
|
|
Загрузка…
Ссылка в новой задаче