mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fix some shortcomings in event_loadeddata.html
Variable 'v' was undefined in second test, and both tests were missing an onerror event handler.
This commit is contained in:
parent
c0040b27fd
commit
3185a7917e
3 changed files with 9 additions and 14 deletions
|
@ -569345,7 +569345,7 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_loadeddata.html": [
|
"html/semantics/embedded-content/media-elements/event_loadeddata.html": [
|
||||||
"c1457d29ad55ea9e6d723e9d9d144f199f614a79",
|
"8bca4ba5dd134781fa0b5d707352ff181ecfa884",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_loadeddata_noautoplay.html": [
|
"html/semantics/embedded-content/media-elements/event_loadeddata_noautoplay.html": [
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
[event_loadeddata.html]
|
[event_loadeddata.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
[setting src attribute on autoplay audio should trigger loadeddata event]
|
||||||
[video events - loadeddata]
|
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[setting src attribute on autoplay video should trigger loadeddata event]
|
|
||||||
expected: NOTRUN
|
|
||||||
|
|
||||||
[setting src attribute on autoplay audio should trigger loadeddata event]
|
|
||||||
expected: NOTRUN
|
|
||||||
|
|
||||||
|
|
|
@ -17,20 +17,22 @@
|
||||||
test(function() {
|
test(function() {
|
||||||
var t = async_test("setting src attribute on autoplay audio should trigger loadeddata event", {timeout:5000});
|
var t = async_test("setting src attribute on autoplay audio should trigger loadeddata event", {timeout:5000});
|
||||||
var a = document.getElementById("a");
|
var a = document.getElementById("a");
|
||||||
a.addEventListener("loadeddata", function() {
|
a.addEventListener("error", t.unreached_func());
|
||||||
|
a.addEventListener("loadeddata", t.step_func(function() {
|
||||||
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 - loadeddata");
|
}, "audio events - loadeddata");
|
||||||
|
|
||||||
test(function() {
|
test(function() {
|
||||||
var t = async_test("setting src attribute on autoplay video should trigger loadeddata event", {timeout:5000});
|
var t = async_test("setting src attribute on autoplay video should trigger loadeddata event", {timeout:5000});
|
||||||
var a = document.getElementById("v");
|
var v = document.getElementById("v");
|
||||||
v.addEventListener("loadeddata", function() {
|
v.addEventListener("error", t.unreached_func());
|
||||||
|
v.addEventListener("loadeddata", t.step_func(function() {
|
||||||
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 - loadeddata");
|
}, "video events - loadeddata");
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue