Skip to content

Commit

Permalink
Properly fail in paused_false_during_play.html
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Sep 29, 2017
1 parent 6aa9d80 commit 71e9879
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tests/wpt/metadata/MANIFEST.json
Expand Up @@ -569785,7 +569785,7 @@
"testharness"
],
"html/semantics/embedded-content/media-elements/paused_false_during_play.html": [
"ff28f3466bf3f0b6df316b774dd4ac28950dbcb7",
"d3a57220a6932719c521953e6ea83f340649dc2b",
"testharness"
],
"html/semantics/embedded-content/media-elements/paused_true_during_pause.html": [
Expand Down
@@ -1,6 +1,5 @@
[paused_false_during_play.html]
type: testharness
expected: TIMEOUT
[audio.paused should be false during play event]
expected: NOTRUN
expected: FAIL

Expand Up @@ -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>
Expand Down

0 comments on commit 71e9879

Please sign in to comment.