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

Side by Side Diff: LayoutTests/webaudio/delaynode-maxdelaylimit.html

Issue 138943003: Check for NaN when creating a DelayNode for WebAudio (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/webaudio/delaynode-maxdelaylimit-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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <script src="../resources/js-test.js"></script> 5 <script src="../resources/js-test.js"></script>
6 <script src="resources/audio-testing.js"></script> 6 <script src="resources/audio-testing.js"></script>
7 <script src="resources/delay-testing.js"></script> 7 <script src="resources/delay-testing.js"></script>
8 </head> 8 </head>
9 9
10 <body> 10 <body>
(...skipping 16 matching lines...) Expand all
27 var context = new webkitOfflineAudioContext(1, sampleRate * renderLengthSeco nds, sampleRate); 27 var context = new webkitOfflineAudioContext(1, sampleRate * renderLengthSeco nds, sampleRate);
28 var toneBuffer = createToneBuffer(context, 20, 20 * toneLengthSeconds, sampl eRate); // 20Hz tone 28 var toneBuffer = createToneBuffer(context, 20, 20 * toneLengthSeconds, sampl eRate); // 20Hz tone
29 29
30 var bufferSource = context.createBufferSource(); 30 var bufferSource = context.createBufferSource();
31 bufferSource.buffer = toneBuffer; 31 bufferSource.buffer = toneBuffer;
32 32
33 window.context = context; 33 window.context = context;
34 shouldThrow("context.createDelay(180)"); 34 shouldThrow("context.createDelay(180)");
35 shouldThrow("context.createDelay(0)"); 35 shouldThrow("context.createDelay(0)");
36 shouldThrow("context.createDelay(-1)"); 36 shouldThrow("context.createDelay(-1)");
37 shouldThrow("context.createDelay(NaN)");
37 38
38 var delay = context.createDelay(179); 39 var delay = context.createDelay(179);
39 delay.delayTime.value = delayTimeSeconds; 40 delay.delayTime.value = delayTimeSeconds;
40 window.delay = delay; 41 window.delay = delay;
41 shouldBeTrue("delay.delayTime.value === 0.5"); 42 shouldBeTrue("delay.delayTime.value === 0.5");
42 43
43 bufferSource.connect(delay); 44 bufferSource.connect(delay);
44 delay.connect(context.destination); 45 delay.connect(context.destination);
45 bufferSource.start(0); 46 bufferSource.start(0);
46 47
47 context.oncomplete = checkDelayedResult(toneBuffer); 48 context.oncomplete = checkDelayedResult(toneBuffer);
48 context.startRendering(); 49 context.startRendering();
49 } 50 }
50 51
51 runTest(); 52 runTest();
52 53
53 </script> 54 </script>
54 55
55 </body> 56 </body>
56 </html> 57 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/webaudio/delaynode-maxdelaylimit-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698