mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Make event_progress.html deterministic (fixes servo/servo#18427)
This commit is contained in:
parent
ffa03380ca
commit
b489d0c159
3 changed files with 12 additions and 11 deletions
|
@ -569409,7 +569409,7 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_progress.html": [
|
"html/semantics/embedded-content/media-elements/event_progress.html": [
|
||||||
"8297355a38ca40dbdb9021f6d28001c7515b7ee4",
|
"ded3566e885ca7d1837f102ebbc6a120708799e4",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/event_progress_noautoplay.html": [
|
"html/semantics/embedded-content/media-elements/event_progress_noautoplay.html": [
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[event_progress.html]
|
[event_progress.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
|
||||||
[setting src attribute on autoplay audio should trigger progress event]
|
[setting src attribute on autoplay audio should trigger progress event]
|
||||||
expected: NOTRUN
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -14,25 +14,27 @@
|
||||||
</video>
|
</video>
|
||||||
<div id="log"></div>
|
<div id="log"></div>
|
||||||
<script>
|
<script>
|
||||||
test(function() {
|
(function() {
|
||||||
var t = async_test("setting src attribute on autoplay audio should trigger progress event", {timeout:5000});
|
var t = async_test("setting src attribute on autoplay audio should trigger progress event", {timeout:5000});
|
||||||
var a = document.getElementById("a");
|
var a = document.getElementById("a");
|
||||||
a.addEventListener("progress", function() {
|
a.addEventListener("error", t.unreached_func());
|
||||||
|
a.addEventListener("progress", 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 - progress");
|
})();
|
||||||
|
|
||||||
test(function() {
|
(function() {
|
||||||
var t = async_test("setting src attribute on autoplay video should trigger progress event", {timeout:5000});
|
var t = async_test("setting src attribute on autoplay video should trigger progress event", {timeout:5000});
|
||||||
var v = document.getElementById("v");
|
var v = document.getElementById("v");
|
||||||
v.addEventListener("progress", function() {
|
v.addEventListener("error", t.unreached_func());
|
||||||
|
v.addEventListener("progress", 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 - progress");
|
})();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue