mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Properly fail in paused_false_during_play.html
This commit is contained in:
parent
6aa9d80a00
commit
71e987951f
3 changed files with 10 additions and 13 deletions
|
@ -17,26 +17,24 @@
|
|||
test(function() {
|
||||
var t = async_test("audio.paused should be false during play event", {timeout:5000});
|
||||
var a = document.getElementById("a");
|
||||
a.addEventListener("play", function() {
|
||||
t.step(function() {
|
||||
assert_false(a.paused);
|
||||
});
|
||||
a.addEventListener("error", t.unreached_func());
|
||||
a.addEventListener("play", t.step_func(function() {
|
||||
assert_false(a.paused);
|
||||
t.done();
|
||||
a.pause();
|
||||
}, false);
|
||||
}), false);
|
||||
a.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
|
||||
}, "audio events - paused property");
|
||||
|
||||
test(function() {
|
||||
var t = async_test("video.paused should be false during play event", {timeout:5000});
|
||||
var v = document.getElementById("v");
|
||||
v.addEventListener("play", function() {
|
||||
t.step(function() {
|
||||
assert_false(v.paused);
|
||||
});
|
||||
v.addEventListener("error", t.unreached_func());
|
||||
v.addEventListener("play", t.step_func(function() {
|
||||
assert_false(v.paused);
|
||||
t.done();
|
||||
v.pause();
|
||||
}, false);
|
||||
}), false);
|
||||
v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
|
||||
}, "video events - paused property");
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue