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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/delaynode-maxdelay.html

Issue 2581463002: Refactor WebAudio test directory (Closed)
Patch Set: Use correct path for wav result files Created 3 years, 12 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
(Empty)
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5 <script src="../resources/js-test.js"></script>
6 <script src="resources/compatibility.js"></script>
7 <script src="resources/audit-util.js"></script>
8 <script src="resources/audio-testing.js"></script>
9 <script src="resources/delay-testing.js"></script>
10 </head>
11
12 <body>
13
14 <div id="description"></div>
15 <div id="console"></div>
16
17 <script>
18 description("Tests basic functionality of DelayNode with a non-default max delay time.");
19
20 function runTest() {
21 if (window.testRunner) {
22 testRunner.dumpAsText();
23 testRunner.waitUntilDone();
24 }
25
26 window.jsTestIsAsync = true;
27
28 // Create offline audio context.
29 var context = new OfflineAudioContext(1, sampleRate * renderLengthSeconds, s ampleRate);
30 var toneBuffer = createToneBuffer(context, 20, 20 * toneLengthSeconds, sampl eRate); // 20Hz tone
31
32 var bufferSource = context.createBufferSource();
33 bufferSource.buffer = toneBuffer;
34
35 // Create a delay node with an explicit max delay time (greater than the def ault of 1 second).
36 var delay = context.createDelay(2);
37 // Set the delay time to a value greater than the default max delay so we ca n verify the delay
38 // is working for this case.
39 delayTimeSeconds = 1.5;
40 delay.delayTime.value = delayTimeSeconds;
41
42 bufferSource.connect(delay);
43 delay.connect(context.destination);
44 bufferSource.start(0);
45
46 context.oncomplete = checkDelayedResult(toneBuffer);
47 context.startRendering();
48 }
49
50 runTest();
51
52 </script>
53
54 </body>
55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698