mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
Properly fail in event_canplaythrough.html
This commit is contained in:
parent
4923045353
commit
8a3afe35fe
3 changed files with 8 additions and 7 deletions
|
@ -569337,7 +569337,7 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_canplaythrough.html": [
|
"html/semantics/embedded-content/media-elements/event_canplaythrough.html": [
|
||||||
"7f6e61d2498bb60077c50a2036430a2bf7a7ec9f",
|
"1e8c7c45424c99a2695ff5857166fe34f39ffdc1",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_canplaythrough_noautoplay.html": [
|
"html/semantics/embedded-content/media-elements/event_canplaythrough_noautoplay.html": [
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[event_canplaythrough.html]
|
[event_canplaythrough.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
|
||||||
[setting src attribute on autoplay audio should trigger canplaythrough event]
|
[setting src attribute on autoplay audio should trigger canplaythrough event]
|
||||||
expected: NOTRUN
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -17,20 +17,22 @@
|
||||||
test(function() {
|
test(function() {
|
||||||
var t = async_test("setting src attribute on autoplay audio should trigger canplaythrough event", {timeout:5000});
|
var t = async_test("setting src attribute on autoplay audio should trigger canplaythrough event", {timeout:5000});
|
||||||
var a = document.getElementById("a");
|
var a = document.getElementById("a");
|
||||||
a.addEventListener("canplaythrough", function() {
|
a.addEventListener("error", t.unreached_func());
|
||||||
|
a.addEventListener("canplaythrough", t.step_func(function() {
|
||||||
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 - canplaythrough");
|
}, "audio events - canplaythrough");
|
||||||
|
|
||||||
test(function() {
|
test(function() {
|
||||||
var t = async_test("setting src attribute on autoplay video should trigger canplaythrough event", {timeout:5000});
|
var t = async_test("setting src attribute on autoplay video should trigger canplaythrough event", {timeout:5000});
|
||||||
var v = document.getElementById("v");
|
var v = document.getElementById("v");
|
||||||
v.addEventListener("canplaythrough", function() {
|
v.addEventListener("error", t.unreached_func());
|
||||||
|
v.addEventListener("canplaythrough", t.step_func(function() {
|
||||||
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 - canplaythrough");
|
}, "video events - canplaythrough");
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue