mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +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"
|
||||
],
|
||||
"html/semantics/embedded-content/media-elements/event_progress.html": [
|
||||
"8297355a38ca40dbdb9021f6d28001c7515b7ee4",
|
||||
"ded3566e885ca7d1837f102ebbc6a120708799e4",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/embedded-content/media-elements/event_progress_noautoplay.html": [
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[event_progress.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[setting src attribute on autoplay audio should trigger progress event]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -14,25 +14,27 @@
|
|||
</video>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
(function() {
|
||||
var t = async_test("setting src attribute on autoplay audio should trigger progress event", {timeout:5000});
|
||||
var a = document.getElementById("a");
|
||||
a.addEventListener("progress", function() {
|
||||
a.addEventListener("error", t.unreached_func());
|
||||
a.addEventListener("progress", t.step_func(function() {
|
||||
t.done();
|
||||
a.pause();
|
||||
}, false);
|
||||
}), false);
|
||||
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 v = document.getElementById("v");
|
||||
v.addEventListener("progress", function() {
|
||||
v.addEventListener("error", t.unreached_func());
|
||||
v.addEventListener("progress", t.step_func(function() {
|
||||
t.done();
|
||||
v.pause();
|
||||
}, false);
|
||||
}), false);
|
||||
v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
|
||||
}, "video events - progress");
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue