mirror of
https://github.com/servo/servo.git
synced 2025-06-20 23:28:59 +01:00
Properly fail in event_order_canplay_canplaythrough.html
This commit is contained in:
parent
59c56de103
commit
026130094d
3 changed files with 14 additions and 17 deletions
|
@ -569369,7 +569369,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"html/semantics/embedded-content/media-elements/event_order_canplay_canplaythrough.html": [
|
||||
"70e74de8fe3eab2c775489364faa1eab832ef14d",
|
||||
"a9a9889a42a2fb654bc09d543320fc5adaf82157",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/embedded-content/media-elements/event_order_canplay_playing.html": [
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[event_order_canplay_canplaythrough.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[setting src attribute on autoplay audio should trigger canplay then canplaythrough event]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -18,16 +18,15 @@ test(function() {
|
|||
var t = async_test("setting src attribute on autoplay audio should trigger canplay then canplaythrough event", {timeout:5000});
|
||||
var a = document.getElementById("a");
|
||||
var found_canplay = false;
|
||||
a.addEventListener("canplay", function() {
|
||||
a.addEventListener("error", t.unreached_func());
|
||||
a.addEventListener("canplay", t.step_func(function() {
|
||||
found_canplay = true;
|
||||
});
|
||||
a.addEventListener("canplaythrough", function() {
|
||||
t.step(function() {
|
||||
assert_true(found_canplay);
|
||||
});
|
||||
}));
|
||||
a.addEventListener("canplaythrough", t.step_func(function() {
|
||||
assert_true(found_canplay);
|
||||
t.done();
|
||||
a.pause();
|
||||
}, false);
|
||||
}), false);
|
||||
a.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
|
||||
}, "audio events - canplay, then canplaythrough");
|
||||
|
||||
|
@ -35,16 +34,15 @@ test(function() {
|
|||
var t = async_test("setting src attribute on autoplay video should trigger canplay then canplaythrough event", {timeout:5000});
|
||||
var v = document.getElementById("v");
|
||||
var found_canplay = false;
|
||||
v.addEventListener("canplay", function() {
|
||||
v.addEventListener("error", t.unreached_func());
|
||||
v.addEventListener("canplay", t.step_func(function() {
|
||||
found_canplay = true;
|
||||
});
|
||||
v.addEventListener("canplaythrough", function() {
|
||||
t.step(function() {
|
||||
assert_true(found_canplay);
|
||||
});
|
||||
}));
|
||||
v.addEventListener("canplaythrough", t.step_func(function() {
|
||||
assert_true(found_canplay);
|
||||
t.done();
|
||||
v.pause();
|
||||
}, false);
|
||||
}), false);
|
||||
v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
|
||||
}, "video events - canplay, then canplaythrough");
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue