mirror of
https://github.com/servo/servo.git
synced 2025-06-20 23:28:59 +01:00
Properly fail in event_play.html
This commit is contained in:
parent
4b2c4aead4
commit
edd3824519
3 changed files with 8 additions and 7 deletions
|
@ -569393,7 +569393,7 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_play.html": [
|
"html/semantics/embedded-content/media-elements/event_play.html": [
|
||||||
"5ab77070444e804dbecad5260dd71ddaa4dba1cb",
|
"aa4636d5968a489ad21b5bef88185ccf343afb01",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_play_noautoplay.html": [
|
"html/semantics/embedded-content/media-elements/event_play_noautoplay.html": [
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[event_play.html]
|
[event_play.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
|
||||||
[setting src attribute on autoplay audio should trigger play event]
|
[setting src attribute on autoplay audio should trigger play 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 play event", {timeout:5000});
|
var t = async_test("setting src attribute on autoplay audio should trigger play event", {timeout:5000});
|
||||||
var a = document.getElementById("a");
|
var a = document.getElementById("a");
|
||||||
a.addEventListener("play", function() {
|
a.addEventListener("error", t.unreached_func());
|
||||||
|
a.addEventListener("play", 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 - play");
|
}, "audio events - play");
|
||||||
|
|
||||||
test(function() {
|
test(function() {
|
||||||
var t = async_test("setting src attribute on autoplay video should trigger play event", {timeout:5000});
|
var t = async_test("setting src attribute on autoplay video should trigger play event", {timeout:5000});
|
||||||
var v = document.getElementById("v");
|
var v = document.getElementById("v");
|
||||||
v.addEventListener("play", function() {
|
v.addEventListener("error", t.unreached_func());
|
||||||
|
v.addEventListener("play", 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 - play");
|
}, "video events - play");
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue