mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Properly fail in event_loadedmetadata_noautoplay.html
This commit is contained in:
parent
7e06d2a1be
commit
37f5f52049
3 changed files with 6 additions and 9 deletions
|
@ -17,18 +17,16 @@
|
|||
test(function() {
|
||||
var t = async_test("setting src attribute on non-autoplay audio should trigger loadedmetadata event", {timeout:5000});
|
||||
var a = document.getElementById("a");
|
||||
a.addEventListener("loadedmetadata", function() {
|
||||
t.done();
|
||||
}, false);
|
||||
a.addEventListener("error", t.unreached_func());
|
||||
a.addEventListener("loadedmetadata", t.step_func_done(), false);
|
||||
a.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
|
||||
}, "audio events - loadedmetadata");
|
||||
|
||||
test(function() {
|
||||
var t = async_test("setting src attribute on non-autoplay video should trigger loadedmetadata event", {timeout:5000});
|
||||
var v = document.getElementById("v");
|
||||
v.addEventListener("loadedmetadata", function() {
|
||||
t.done();
|
||||
}, false);
|
||||
v.addEventListener("error", t.unreached_func());
|
||||
v.addEventListener("loadedmetadata", t.step_func_done(), false);
|
||||
v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
|
||||
}, "video events, loadedmetadata");
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue