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

Side by Side Diff: third_party/WebKit/LayoutTests/media/audio-constructor.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/audio-constructor-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <body> 1 <!DOCTYPE html>
2 <p>Test that Audio() object loads the resource after src attribute is set and lo ad() is called.</p> 2 <title>Test that Audio() object loads the resource after src attribute is set an d load() is called.</title>
3 <script src="media-file.js"></script>
4 <script src="../resources/testharness.js"></script>
5 <script src="../resources/testharnessreport.js"></script>
6 <script>
7 async_test(function(t) {
8 var audio = new Audio();
3 9
4 <script src=media-file.js></script> 10 var audioFile = findMediaFile("audio", "content/test");
5 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 11 audio.src = audioFile;
6 (Please avoid writing new tests using video-test.js) --> 12 audio.onloadstart = t.step_func(function () {
7 <script src=video-test.js></script> 13 var url = audio.currentSrc;
14 assert_equals(url.substr(url.lastIndexOf("/media/")+7), audioFile);
15 });
8 16
9 <script> 17 audio.oncanplaythrough = t.step_func_done();
10 var audio = new Audio();
11 mediaElement = audio;
12 18
13 testExpected("audio instanceof HTMLAudioElement", true); 19 audio.load();
14 20 });
15 var mediaFile = findMediaFile("audio", "content/test"); 21 </script>
16 waitForEvent("loadstart", function () { testExpected("relativeURL(audio.curr entSrc)", mediaFile); });
17
18 waitForEventAndEnd("canplaythrough");
19
20 audio.src = mediaFile;
21 run("audio.load()");
22 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/audio-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698