Properly use test() in networkState_during_progress.html

This commit is contained in:
Anthony Ramine 2017-09-29 16:51:55 +02:00
parent 2b64c3e6c0
commit 9f71ac9155
2 changed files with 23 additions and 19 deletions

View file

@ -569769,7 +569769,7 @@
"testharness"
],
"html/semantics/embedded-content/media-elements/networkState_during_progress.html": [
"55a5483997ec3c51f3cfb575c12e349935d83dbe",
"d57f05ca1884cc3dbdaac9130cba1f63adf693ed",
"testharness"
],
"html/semantics/embedded-content/media-elements/networkState_initial.html": [

View file

@ -14,6 +14,7 @@
</video>
<div id="log"></div>
<script>
test(function() {
var ta = async_test("audioElement.networkState should be NETWORK_LOADING during progress event", {timeout:5000});
var a = document.getElementById("a");
a.addEventListener("error", ta.unreached_func());
@ -23,7 +24,9 @@ a.addEventListener("progress", ta.step_func(function() {
a.pause();
}), false);
a.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
}, "audio events - networkState during progress");
test(function() {
var tv = async_test("videoElement.networkState should be NETWORK_LOADING during progress event", {timeout:5000});
var v = document.getElementById("v");
v.addEventListener("error", tv.unreached_func());
@ -33,6 +36,7 @@ v.addEventListener("progress", tv.step_func(function() {
v.pause();
}), false);
v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
}, "video events - networkState during progress");
</script>
</body>
</html>