mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Properly fail in event_pause.html
This commit is contained in:
parent
7b7f66f210
commit
4b2c4aead4
3 changed files with 10 additions and 19 deletions
|
@ -569385,7 +569385,7 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_pause.html": [
|
"html/semantics/embedded-content/media-elements/event_pause.html": [
|
||||||
"d1d4945f75e8febfd1ed29947700da38d9adcda4",
|
"f7ab9fc551958133aa80482828a59c82ffbfaa7a",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_pause_noautoplay.html": [
|
"html/semantics/embedded-content/media-elements/event_pause_noautoplay.html": [
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[event_pause.html]
|
[event_pause.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
|
||||||
[calling pause() on autoplay audio should trigger pause event]
|
[calling pause() on autoplay audio should trigger pause event]
|
||||||
expected: NOTRUN
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -17,30 +17,22 @@
|
||||||
test(function() {
|
test(function() {
|
||||||
var t = async_test("calling pause() on autoplay audio should trigger pause event", {timeout:5000});
|
var t = async_test("calling pause() on autoplay audio should trigger pause event", {timeout:5000});
|
||||||
var a = document.getElementById("a");
|
var a = document.getElementById("a");
|
||||||
a.addEventListener("pause", function() {
|
a.addEventListener("error", t.unreached_func());
|
||||||
t.step(function() {
|
a.addEventListener("pause", t.step_func_done(), false);
|
||||||
assert_true(true);
|
a.addEventListener("play", t.step_func(function() {
|
||||||
});
|
|
||||||
t.done();
|
|
||||||
}, false);
|
|
||||||
a.addEventListener("play", function() {
|
|
||||||
a.pause(); // pause right after play
|
a.pause(); // pause right after play
|
||||||
});
|
}));
|
||||||
a.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
|
a.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
|
||||||
}, "audio events - pause");
|
}, "audio events - pause");
|
||||||
|
|
||||||
test(function() {
|
test(function() {
|
||||||
var t = async_test("calling pause() on autoplay video should trigger pause event", {timeout:5000});
|
var t = async_test("calling pause() on autoplay video should trigger pause event", {timeout:5000});
|
||||||
var v = document.getElementById("v");
|
var v = document.getElementById("v");
|
||||||
v.addEventListener("pause", function() {
|
v.addEventListener("error", t.unreached_func());
|
||||||
t.step(function() {
|
v.addEventListener("pause", t.step_func_done(), false);
|
||||||
assert_true(true);
|
v.addEventListener("play", t.step_func(function() {
|
||||||
});
|
|
||||||
t.done();
|
|
||||||
}, false);
|
|
||||||
v.addEventListener("play", function() {
|
|
||||||
v.pause(); // pause right after play
|
v.pause(); // pause right after play
|
||||||
});
|
}));
|
||||||
v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
|
v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
|
||||||
}, "video events - pause");
|
}, "video events - pause");
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue