mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Properly fail on error event in event_timeupdate_noautoplay.html
The tests still time out when the browser doesn't fire a timeupdate event at all.
This commit is contained in:
parent
c93b3d1639
commit
fb9d3bf350
3 changed files with 8 additions and 6 deletions
|
@ -569421,7 +569421,7 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_timeupdate_noautoplay.html": [
|
"html/semantics/embedded-content/media-elements/event_timeupdate_noautoplay.html": [
|
||||||
"5156765c6bc0e4ce9f6d8ca55e48f5871046f7f4",
|
"c2120a0fdf26f370bd88d18794d4c3dc689730a2",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_volumechange.html": [
|
"html/semantics/embedded-content/media-elements/event_volumechange.html": [
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
expected: TIMEOUT
|
||||||
[calling play() on a sufficiently long audio should trigger timeupdate event]
|
[calling play() on a sufficiently long audio should trigger timeupdate event]
|
||||||
expected: NOTRUN
|
expected: FAIL
|
||||||
|
|
||||||
[calling play() on a sufficiently long video should trigger timeupdate event]
|
[calling play() on a sufficiently long video should trigger timeupdate event]
|
||||||
expected: NOTRUN
|
expected: NOTRUN
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
test(function() {
|
test(function() {
|
||||||
var t = async_test("calling play() on a sufficiently long audio should trigger timeupdate event", {timeout:5000});
|
var t = async_test("calling play() on a sufficiently long audio should trigger timeupdate event", {timeout:5000});
|
||||||
var a = document.getElementById("a");
|
var a = document.getElementById("a");
|
||||||
a.addEventListener("timeupdate", function() {
|
a.addEventListener("error", t.unreached_func());
|
||||||
|
a.addEventListener("timeupdate", 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();
|
||||||
a.play();
|
a.play();
|
||||||
}, "audio events - timeupdate");
|
}, "audio events - timeupdate");
|
||||||
|
@ -28,10 +29,11 @@ test(function() {
|
||||||
test(function() {
|
test(function() {
|
||||||
var t = async_test("calling play() on a sufficiently long video should trigger timeupdate event", {timeout:5000});
|
var t = async_test("calling play() on a sufficiently long video should trigger timeupdate event", {timeout:5000});
|
||||||
var v = document.getElementById("v");
|
var v = document.getElementById("v");
|
||||||
v.addEventListener("timeupdate", function() {
|
v.addEventListener("error", t.unreached_func());
|
||||||
|
v.addEventListener("timeupdate", 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();
|
||||||
v.play();
|
v.play();
|
||||||
}, "video events - timeupdate");
|
}, "video events - timeupdate");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue