mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Properly fail in event_loadedmetadata.html
This commit is contained in:
parent
9f71ac9155
commit
59c56de103
3 changed files with 8 additions and 7 deletions
|
@ -569353,7 +569353,7 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_loadedmetadata.html": [
|
"html/semantics/embedded-content/media-elements/event_loadedmetadata.html": [
|
||||||
"a0fa9cca891fcdf066409b225daff6d09bf53601",
|
"138177c8cebf75e7fa54e6def5f90cfd094af5d6",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_loadedmetadata_noautoplay.html": [
|
"html/semantics/embedded-content/media-elements/event_loadedmetadata_noautoplay.html": [
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[event_loadedmetadata.html]
|
[event_loadedmetadata.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
|
||||||
[setting src attribute on autoplay audio should trigger loadedmetadata event]
|
[setting src attribute on autoplay audio should trigger loadedmetadata event]
|
||||||
expected: NOTRUN
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -17,20 +17,22 @@
|
||||||
test(function() {
|
test(function() {
|
||||||
var t = async_test("setting src attribute on autoplay audio should trigger loadedmetadata event", {timeout:5000});
|
var t = async_test("setting src attribute on autoplay audio should trigger loadedmetadata event", {timeout:5000});
|
||||||
var a = document.getElementById("a");
|
var a = document.getElementById("a");
|
||||||
a.addEventListener("loadedmetadata", function() {
|
a.addEventListener("error", t.unreached_func());
|
||||||
|
a.addEventListener("loadedmetadata", t.step_func(function() {
|
||||||
t.done();
|
t.done();
|
||||||
a.pause();
|
a.pause();
|
||||||
});
|
}));
|
||||||
a.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
|
a.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
|
||||||
}, "audio events - loadedmetadata");
|
}, "audio events - loadedmetadata");
|
||||||
|
|
||||||
test(function() {
|
test(function() {
|
||||||
var t = async_test("setting src attribute on autoplay video should trigger loadedmetadata event", {timeout:5000});
|
var t = async_test("setting src attribute on autoplay video should trigger loadedmetadata event", {timeout:5000});
|
||||||
var v = document.getElementById("v");
|
var v = document.getElementById("v");
|
||||||
v.addEventListener("loadedmetadata", function() {
|
v.addEventListener("error", t.unreached_func());
|
||||||
|
v.addEventListener("loadedmetadata", t.step_func(function() {
|
||||||
t.done();
|
t.done();
|
||||||
v.pause();
|
v.pause();
|
||||||
});
|
}));
|
||||||
v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
|
v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
|
||||||
}, "video events - loadedmetadata");
|
}, "video events - loadedmetadata");
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue