Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / audio-constructor.html
blob5c13e2600b653c0c212c297c40cb3e20a52342c3
1 <body>
2 <p>Test that Audio() object loads the resource after src attribute is set and load() is called.</p>
4 <script src=media-file.js></script>
5 <script src=video-test.js></script>
7 <script>
8 var audio = new Audio();
9 mediaElement = audio;
11 testExpected("audio instanceof HTMLAudioElement", true);
13 var mediaFile = findMediaFile("audio", "content/test");
14 waitForEvent("loadstart", function () { testExpected("relativeURL(audio.currentSrc)", mediaFile); });
16 waitForEventAndEnd("canplaythrough");
18 audio.src = mediaFile;
19 run("audio.load()");
20 </script>