Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Side by Side Diff: third_party/WebKit/LayoutTests/media/audio-constructor-src.html

Issue 1997263002: Convert audio-constructor* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <body> 1 <!DOCTYPE html>
2 <p>Test that Audio("url") constructor loads the specified resource.</p> 2 <title>Test that Audio("url") constructor loads the specified resource.</title>
3 <script src=media-file.js></script> 3 <script src="media-file.js"></script>
4 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 4 <script src="../resources/testharness.js"></script>
5 (Please avoid writing new tests using video-test.js) --> 5 <script src="../resources/testharnessreport.js"></script>
6 <script src=video-test.js></script>
7 <script> 6 <script>
7 async_test(function(t) {
8 var audioFile = findMediaFile("audio", "content/test"); 8 var audioFile = findMediaFile("audio", "content/test");
9 var audio = new Audio(audioFile); 9 var audio = new Audio(audioFile);
10 mediaElement = audio;
11 10
12 testExpected("audio instanceof HTMLAudioElement", true); 11 audio.onloadstart = t.step_func(function () {
12 var url = audio.currentSrc;
13 assert_equals(url.substr(url.lastIndexOf("/media/")+7), audioFile);
14 });
13 15
14 waitForEvent("loadstart", function () { testExpected("relativeURL(audio.curr entSrc)", audioFile); }); 16 audio.oncanplaythrough = t.step_func_done();
15 17 });
16 waitForEventAndEnd("canplaythrough"); 18 </script>
17 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698