mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Properly fail in readyState_during_loadeddata.html
This commit is contained in:
parent
9856580e25
commit
ce8fc063db
3 changed files with 10 additions and 13 deletions
|
@ -569837,7 +569837,7 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/readyState_during_loadeddata.html": [
|
"html/semantics/embedded-content/media-elements/readyState_during_loadeddata.html": [
|
||||||
"05eff7f919c9c471f4116d046eb83de3a11cb890",
|
"0f2040296385970bc1fbb2ffa8604e9d0857ff35",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/readyState_during_loadedmetadata.html": [
|
"html/semantics/embedded-content/media-elements/readyState_during_loadedmetadata.html": [
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[readyState_during_loadeddata.html]
|
[readyState_during_loadeddata.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
|
||||||
[audio.readyState should be >= HAVE_CURRENT_DATA during loadeddata event]
|
[audio.readyState should be >= HAVE_CURRENT_DATA during loadeddata event]
|
||||||
expected: NOTRUN
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -17,26 +17,24 @@
|
||||||
test(function() {
|
test(function() {
|
||||||
var t = async_test("audio.readyState should be >= HAVE_CURRENT_DATA during loadeddata event", {timeout:5000});
|
var t = async_test("audio.readyState should be >= HAVE_CURRENT_DATA during loadeddata event", {timeout:5000});
|
||||||
var a = document.getElementById("a");
|
var a = document.getElementById("a");
|
||||||
a.addEventListener("loadeddata", function() {
|
a.addEventListener("error", t.unreached_func());
|
||||||
t.step(function() {
|
a.addEventListener("loadeddata", t.step_func(function() {
|
||||||
assert_greater_than_equal(a.readyState, a.HAVE_CURRENT_DATA);
|
assert_greater_than_equal(a.readyState, a.HAVE_CURRENT_DATA);
|
||||||
});
|
|
||||||
t.done();
|
t.done();
|
||||||
a.pause();
|
a.pause();
|
||||||
}, false);
|
}), false);
|
||||||
a.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
|
a.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
|
||||||
}, "audio events - readyState property during loadeddata");
|
}, "audio events - readyState property during loadeddata");
|
||||||
|
|
||||||
test(function() {
|
test(function() {
|
||||||
var t = async_test("video.readyState should be >= HAVE_CURRENT_DATA during loadeddata event", {timeout:5000});
|
var t = async_test("video.readyState should be >= HAVE_CURRENT_DATA during loadeddata event", {timeout:5000});
|
||||||
var v = document.getElementById("v");
|
var v = document.getElementById("v");
|
||||||
v.addEventListener("loadeddata", function() {
|
v.addEventListener("error", t.unreached_func());
|
||||||
t.step(function() {
|
v.addEventListener("loadeddata", t.step_func(function() {
|
||||||
assert_greater_than_equal(v.readyState, v.HAVE_CURRENT_DATA);
|
assert_greater_than_equal(v.readyState, v.HAVE_CURRENT_DATA);
|
||||||
});
|
|
||||||
t.done();
|
t.done();
|
||||||
v.pause();
|
v.pause();
|
||||||
}, false);
|
}), false);
|
||||||
v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
|
v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
|
||||||
}, "video events - readyState property during loadeddata");
|
}, "video events - readyState property during loadeddata");
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue