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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/decodeAudioData/decode-audio-data-basic.html

Issue 2581463002: Refactor WebAudio test directory (Closed)
Patch Set: Use correct path for wav result files Created 4 years 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 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <script src="resources/compatibility.js"></script> 5 <script src="../resources/compatibility.js"></script>
6 <script src="resources/audit-util.js"></script> 6 <script src="../resources/audit-util.js"></script>
7 <script src="resources/audio-testing.js"></script> 7 <script src="../resources/audio-testing.js"></script>
8 <title>Test decodeAudioData promises</title> 8 <title>Test decodeAudioData promises</title>
9 </head> 9 </head>
10 10
11 <body> 11 <body>
12 <script> 12 <script>
13 description("Basic tests for decodeAudioData promise."); 13 description("Basic tests for decodeAudioData promise.");
14 window.jsTestIsAsync = true; 14 window.jsTestIsAsync = true;
15 15
16 // Use offline context for decoding because we want a fixed know sample rate , independent of the 16 // Use offline context for decoding because we want a fixed know sample rate , independent of the
17 // hardware because the test file is encoded at 44.1 kHz. If we don't decod eAudioData will 17 // hardware because the test file is encoded at 44.1 kHz. If we don't decod eAudioData will
18 // resample the data messing up the assumptions in this test. The length is unimportant. 18 // resample the data messing up the assumptions in this test. The length is unimportant.
19 var context = new OfflineAudioContext(1, 1, 44100); 19 var context = new OfflineAudioContext(1, 1, 44100);
20 20
21 // Test files for decodeAudioData 21 // Test files for decodeAudioData
22 var validAudioFile = "resources/media/24bit-44khz.wav"; 22 var validAudioFile = "../resources/media/24bit-44khz.wav";
23 var invalidAudioFile = "resources/media/invalid-audio-file.txt"; 23 var invalidAudioFile = "../resources/media/invalid-audio-file.txt";
24 var invalidLiveStream = '../media/resources/test-live.webm'; 24 var invalidLiveStream = '../../media/resources/test-live.webm';
25 25
26 // Decoded data from validAudioFile 26 // Decoded data from validAudioFile
27 var referenceDecodedAudioBuffer; 27 var referenceDecodedAudioBuffer;
28 // Encoded audio data for testing decodeAudioData after the context has been closed. 28 // Encoded audio data for testing decodeAudioData after the context has been closed.
29 var encodedAudioData; 29 var encodedAudioData;
30 // Decoded data from decodeAudioData after the context has been closed. 30 // Decoded data from decodeAudioData after the context has been closed.
31 var decodedAudioBufferAfterClose; 31 var decodedAudioBufferAfterClose;
32 32
33 // Utility to load an encoded audio file from |url| and decode it. |success | and |failure| are 33 // Utility to load an encoded audio file from |url| and decode it. |success | and |failure| are
34 // functions to handle the then and else cases of the promise returned by de codeAudioData. 34 // functions to handle the then and else cases of the promise returned by de codeAudioData.
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 finishJSTest(); 224 finishJSTest();
225 done(); 225 done();
226 }); 226 });
227 227
228 audit.runTasks(); 228 audit.runTasks();
229 229
230 successfullyParsed = true; 230 successfullyParsed = true;
231 </script> 231 </script>
232 </body> 232 </body>
233 </html> 233 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698