Properly use test() in event_progress.html

This commit is contained in:
Anthony Ramine 2017-09-29 16:51:55 +02:00
parent 8732f6de69
commit 7bab9caafd
2 changed files with 5 additions and 5 deletions

View file

@ -569409,7 +569409,7 @@
"testharness" "testharness"
], ],
"html/semantics/embedded-content/media-elements/event_progress.html": [ "html/semantics/embedded-content/media-elements/event_progress.html": [
"ded3566e885ca7d1837f102ebbc6a120708799e4", "c5d307c9d5b3283f72c88f1496e9ccd6526db285",
"testharness" "testharness"
], ],
"html/semantics/embedded-content/media-elements/event_progress_noautoplay.html": [ "html/semantics/embedded-content/media-elements/event_progress_noautoplay.html": [

View file

@ -14,7 +14,7 @@
</video> </video>
<div id="log"></div> <div id="log"></div>
<script> <script>
(function() { test(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("error", t.unreached_func()); a.addEventListener("error", t.unreached_func());
@ -23,9 +23,9 @@
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");
(function() { test(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("error", t.unreached_func()); v.addEventListener("error", t.unreached_func());
@ -34,7 +34,7 @@
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>