Properly fail in paused_false_during_play.html

This commit is contained in:
Anthony Ramine 2017-09-29 18:52:00 +02:00
parent 6aa9d80a00
commit 71e987951f
3 changed files with 10 additions and 13 deletions

View file

@ -569785,7 +569785,7 @@
"testharness" "testharness"
], ],
"html/semantics/embedded-content/media-elements/paused_false_during_play.html": [ "html/semantics/embedded-content/media-elements/paused_false_during_play.html": [
"ff28f3466bf3f0b6df316b774dd4ac28950dbcb7", "d3a57220a6932719c521953e6ea83f340649dc2b",
"testharness" "testharness"
], ],
"html/semantics/embedded-content/media-elements/paused_true_during_pause.html": [ "html/semantics/embedded-content/media-elements/paused_true_during_pause.html": [

View file

@ -1,6 +1,5 @@
[paused_false_during_play.html] [paused_false_during_play.html]
type: testharness type: testharness
expected: TIMEOUT
[audio.paused should be false during play event] [audio.paused should be false during play event]
expected: NOTRUN expected: FAIL

View file

@ -17,26 +17,24 @@
test(function() { test(function() {
var t = async_test("audio.paused should be false during play event", {timeout:5000}); var t = async_test("audio.paused should be false during play event", {timeout:5000});
var a = document.getElementById("a"); var a = document.getElementById("a");
a.addEventListener("play", function() { a.addEventListener("error", t.unreached_func());
t.step(function() { a.addEventListener("play", t.step_func(function() {
assert_false(a.paused); assert_false(a.paused);
});
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 - paused property"); }, "audio events - paused property");
test(function() { test(function() {
var t = async_test("video.paused should be false during play event", {timeout:5000}); var t = async_test("video.paused should be false during play event", {timeout:5000});
var v = document.getElementById("v"); var v = document.getElementById("v");
v.addEventListener("play", function() { v.addEventListener("error", t.unreached_func());
t.step(function() { v.addEventListener("play", t.step_func(function() {
assert_false(v.paused); assert_false(v.paused);
});
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 - paused property"); }, "video events - paused property");
</script> </script>