| Index: third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/media-elements/event_loadedmetadata.html
|
| diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/media-elements/event_loadedmetadata.html b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/media-elements/event_loadedmetadata.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..234121e58b5678433fa91fbd56161ce04027ff7b
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/media-elements/event_loadedmetadata.html
|
| @@ -0,0 +1,38 @@
|
| +<!doctype html>
|
| +<html>
|
| + <head>
|
| + <title>{audio,video} events - loadedmetadata</title>
|
| + <script src="/resources/testharness.js"></script>
|
| + <script src="/resources/testharnessreport.js"></script>
|
| + <script src="/common/media.js"></script>
|
| + </head>
|
| + <body>
|
| + <p><a href="https://html.spec.whatwg.org/multipage/#mediaevents">spec reference</a></p>
|
| + <audio id="a" autoplay controls>
|
| + </audio>
|
| + <video id="v" autoplay controls>
|
| + </video>
|
| + <div id="log"></div>
|
| + <script>
|
| +test(function() {
|
| + var t = async_test("setting src attribute on autoplay audio should trigger loadedmetadata event", {timeout:5000});
|
| + var a = document.getElementById("a");
|
| + a.addEventListener("loadedmetadata", function() {
|
| + t.done();
|
| + a.pause();
|
| + });
|
| + a.src = getAudioURI("/media/sound_5") + "?" + new Date() + Math.random();
|
| +}, "audio events - loadedmetadata");
|
| +
|
| +test(function() {
|
| + var t = async_test("setting src attribute on autoplay video should trigger loadedmetadata event", {timeout:5000});
|
| + var v = document.getElementById("v");
|
| + v.addEventListener("loadedmetadata", function() {
|
| + t.done();
|
| + v.pause();
|
| + });
|
| + v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random();
|
| +}, "video events - loadedmetadata");
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|