mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Properly fail in readyState_during_canplaythrough.html
This commit is contained in:
parent
4ca5a05eed
commit
9856580e25
3 changed files with 10 additions and 15 deletions
|
@ -569833,7 +569833,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"html/semantics/embedded-content/media-elements/readyState_during_canplaythrough.html": [
|
||||
"93d9bd7ab6dc10b762ba51d50612421adae3da36",
|
||||
"d0e49ab44c3919e861bda39e01cda4fcbc1196fa",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/embedded-content/media-elements/readyState_during_loadeddata.html": [
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[readyState_during_canplaythrough.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[audio.readyState should be HAVE_ENOUGH_DATA during canplaythrough event]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -17,28 +17,24 @@
|
|||
test(function() {
|
||||
var t = async_test("audio.readyState should be HAVE_ENOUGH_DATA during canplaythrough event", {timeout:5000});
|
||||
var a = document.getElementById("a");
|
||||
a.addEventListener("canplaythrough", function() {
|
||||
t.step(function() {
|
||||
assert_equals(a.readyState,
|
||||
a.HAVE_ENOUGH_DATA);
|
||||
});
|
||||
a.addEventListener("error", t.unreached_func());
|
||||
a.addEventListener("canplaythrough", t.step_func(function() {
|
||||
assert_equals(a.readyState, a.HAVE_ENOUGH_DATA);
|
||||
t.done();
|
||||
a.pause();
|
||||
}, false);
|
||||
}), false);
|
||||
a.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
|
||||
}, "audio events - readyState property during canplaythrough");
|
||||
|
||||
test(function() {
|
||||
var t = async_test("video.readyState should be HAVE_ENOUGH_DATA during canplaythrough event", {timeout:5000});
|
||||
var v = document.getElementById("v");
|
||||
v.addEventListener("canplaythrough", function() {
|
||||
t.step(function() {
|
||||
assert_equals(v.readyState,
|
||||
v.HAVE_ENOUGH_DATA);
|
||||
});
|
||||
v.addEventListener("error", t.unreached_func());
|
||||
v.addEventListener("canplaythrough", t.step_func(function() {
|
||||
assert_equals(v.readyState, v.HAVE_ENOUGH_DATA);
|
||||
t.done();
|
||||
v.pause();
|
||||
}, false);
|
||||
}), false);
|
||||
v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
|
||||
}, "video events - readyState property during canplaythrough");
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue