Properly fail in event_canplaythrough_noautoplay.html

This commit is contained in:
Anthony Ramine 2017-09-29 14:47:57 +02:00
parent 8a3afe35fe
commit c0040b27fd
3 changed files with 6 additions and 9 deletions

View file

@ -569341,7 +569341,7 @@
"testharness"
],
"html/semantics/embedded-content/media-elements/event_canplaythrough_noautoplay.html": [
"04dba01a3d3da718a2ea3e65078d41fbfec982be",
"9356b4db1afec24866154701da6e9814f5b891a9",
"testharness"
],
"html/semantics/embedded-content/media-elements/event_loadeddata.html": [

View file

@ -1,6 +1,5 @@
[event_canplaythrough_noautoplay.html]
type: testharness
expected: TIMEOUT
[setting src attribute on non-autoplay audio should trigger canplaythrough event]
expected: NOTRUN
expected: FAIL

View file

@ -17,18 +17,16 @@
test(function() {
var t = async_test("setting src attribute on non-autoplay audio should trigger canplaythrough event", {timeout:5000});
var a = document.getElementById("a");
a.addEventListener("canplaythrough", function() {
t.done();
}, false);
a.addEventListener("error", t.unreached_func());
a.addEventListener("canplaythrough", t.step_func_done(), false);
a.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
}, "audio events - canplaythrough");
test(function() {
var t = async_test("setting src attribute on non-autoplay video should trigger canplaythrough event", {timeout:5000});
var v = document.getElementById("v");
v.addEventListener("canplaythrough", function() {
t.done();
}, false);
v.addEventListener("error", t.unreached_func());
v.addEventListener("canplaythrough", t.step_func_done(), false);
v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
}, "video events - canplaythrough");
</script>