mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Make networkState_during_progress.html deterministic (fixes servo/servo#17954)
This commit is contained in:
parent
abcf91e5c6
commit
53e2a4449a
3 changed files with 10 additions and 15 deletions
|
@ -569769,7 +569769,7 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/networkState_during_progress.html": [
|
"html/semantics/embedded-content/media-elements/networkState_during_progress.html": [
|
||||||
"e934a38666b8d9fe9c02650b32672ca388bfd03b",
|
"55a5483997ec3c51f3cfb575c12e349935d83dbe",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"html/semantics/embedded-content/media-elements/networkState_initial.html": [
|
"html/semantics/embedded-content/media-elements/networkState_initial.html": [
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[networkState_during_progress.html]
|
[networkState_during_progress.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
|
||||||
[audioElement.networkState should be NETWORK_LOADING during progress event]
|
[audioElement.networkState should be NETWORK_LOADING during progress event]
|
||||||
expected: NOTRUN
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -16,26 +16,22 @@
|
||||||
<script>
|
<script>
|
||||||
var ta = async_test("audioElement.networkState should be NETWORK_LOADING during progress event", {timeout:5000});
|
var ta = async_test("audioElement.networkState should be NETWORK_LOADING during progress event", {timeout:5000});
|
||||||
var a = document.getElementById("a");
|
var a = document.getElementById("a");
|
||||||
a.addEventListener("progress", function() {
|
a.addEventListener("error", ta.unreached_func());
|
||||||
ta.step(function() {
|
a.addEventListener("progress", ta.step_func(function() {
|
||||||
assert_equals(a.networkState,
|
assert_equals(a.networkState, a.NETWORK_LOADING);
|
||||||
a.NETWORK_LOADING);
|
|
||||||
});
|
|
||||||
ta.done();
|
ta.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();
|
||||||
|
|
||||||
var tv = async_test("videoElement.networkState should be NETWORK_LOADING during progress event", {timeout:5000});
|
var tv = async_test("videoElement.networkState should be NETWORK_LOADING during progress event", {timeout:5000});
|
||||||
var v = document.getElementById("v");
|
var v = document.getElementById("v");
|
||||||
v.addEventListener("progress", function() {
|
v.addEventListener("error", tv.unreached_func());
|
||||||
tv.step(function() {
|
v.addEventListener("progress", tv.step_func(function() {
|
||||||
assert_equals(v.networkState,
|
assert_equals(v.networkState, v.NETWORK_LOADING);
|
||||||
v.NETWORK_LOADING);
|
|
||||||
});
|
|
||||||
tv.done();
|
tv.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();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue