mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Properly fail in event_order_loadedmetadata_loadeddata.html
This commit is contained in:
parent
60b5b77ccb
commit
7b7f66f210
3 changed files with 15 additions and 18 deletions
|
@ -569373,11 +569373,11 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_order_canplay_playing.html": [
|
"html/semantics/embedded-content/media-elements/event_order_canplay_playing.html": [
|
||||||
"31e4dbecfe979d8d9435f2a69938fa8887ff981e",
|
"7d2254f2362cc90fd7f7573d5c7b7a9bfd29187e",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_order_loadedmetadata_loadeddata.html": [
|
"html/semantics/embedded-content/media-elements/event_order_loadedmetadata_loadeddata.html": [
|
||||||
"1f9a9ee27d7cedb3c7f128276770334780afb523",
|
"47080891dfd6b2f011fdbb6423e2635ac84eecc4",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_order_loadstart_progress.html": [
|
"html/semantics/embedded-content/media-elements/event_order_loadstart_progress.html": [
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[event_order_loadedmetadata_loadeddata.html]
|
[event_order_loadedmetadata_loadeddata.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
|
||||||
[setting src attribute on autoplay audio should trigger loadedmetadata then loadeddata event]
|
[setting src attribute on autoplay audio should trigger loadedmetadata then loadeddata event]
|
||||||
expected: NOTRUN
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -18,16 +18,15 @@ test(function() {
|
||||||
var t = async_test("setting src attribute on autoplay audio should trigger loadedmetadata then loadeddata event", {timeout:5000});
|
var t = async_test("setting src attribute on autoplay audio should trigger loadedmetadata then loadeddata event", {timeout:5000});
|
||||||
var a = document.getElementById("a");
|
var a = document.getElementById("a");
|
||||||
var found_loadedmetadata = false;
|
var found_loadedmetadata = false;
|
||||||
a.addEventListener("loadedmetadata", function() {
|
a.addEventListener("error", t.unreached_func());
|
||||||
|
a.addEventListener("loadedmetadata", t.step_func(function() {
|
||||||
found_loadedmetadata = true;
|
found_loadedmetadata = true;
|
||||||
});
|
}));
|
||||||
a.addEventListener("loadeddata", function() {
|
a.addEventListener("loadeddata", t.step_func(function() {
|
||||||
t.step(function() {
|
assert_true(found_loadedmetadata);
|
||||||
assert_true(found_loadedmetadata);
|
|
||||||
});
|
|
||||||
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 - loadedmetadata, then loadeddata");
|
}, "audio events - loadedmetadata, then loadeddata");
|
||||||
|
|
||||||
|
@ -35,16 +34,15 @@ test(function() {
|
||||||
var t = async_test("setting src attribute on autoplay video should trigger loadedmetadata then loadeddata event", {timeout:5000});
|
var t = async_test("setting src attribute on autoplay video should trigger loadedmetadata then loadeddata event", {timeout:5000});
|
||||||
var v = document.getElementById("v");
|
var v = document.getElementById("v");
|
||||||
var found_loadedmetadata = false;
|
var found_loadedmetadata = false;
|
||||||
v.addEventListener("loadedmetadata", function() {
|
v.addEventListener("error", t.unreached_func());
|
||||||
|
v.addEventListener("loadedmetadata", t.step_func(function() {
|
||||||
found_loadedmetadata = true;
|
found_loadedmetadata = true;
|
||||||
});
|
}));
|
||||||
v.addEventListener("loadeddata", function() {
|
v.addEventListener("loadeddata", t.step_func(function() {
|
||||||
t.step(function() {
|
assert_true(found_loadedmetadata);
|
||||||
assert_true(found_loadedmetadata);
|
|
||||||
});
|
|
||||||
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 - loadedmetadata, then loadeddata");
|
}, "video events - loadedmetadata, then loadeddata");
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue