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

Side by Side Diff: LayoutTests/webaudio/dom-exceptions.html

Issue 235653002: WebAudio createBuffer should throw error with 0 channels. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/dom-exceptions-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 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="resources/compatibility.js"></script> 4 <script src="resources/compatibility.js"></script>
5 <script src="resources/audio-testing.js"></script> 5 <script src="resources/audio-testing.js"></script>
6 <script src="../resources/js-test.js"></script> 6 <script src="../resources/js-test.js"></script>
7 <script src="resources/biquad-testing.js"></script> 7 <script src="resources/biquad-testing.js"></script>
8 </head> 8 </head>
9 9
10 <body> 10 <body>
(...skipping 14 matching lines...) Expand all
25 testRunner.dumpAsText(); 25 testRunner.dumpAsText();
26 } 26 }
27 27
28 context = new AudioContext(); 28 context = new AudioContext();
29 otherContext = new AudioContext(); 29 otherContext = new AudioContext();
30 30
31 // Test creation of various objects 31 // Test creation of various objects
32 32
33 // Invalid number of channels: NotSupportedError 33 // Invalid number of channels: NotSupportedError
34 shouldThrow("context.createBuffer(99, 1, context.sampleRate)"); 34 shouldThrow("context.createBuffer(99, 1, context.sampleRate)");
35 shouldThrow("context.createBuffer(0, 1, context.sampleRate)");
35 // Invalid sample rate: NotSupportedError 36 // Invalid sample rate: NotSupportedError
36 shouldThrow("context.createBuffer(1, 1, 1)"); 37 shouldThrow("context.createBuffer(1, 1, 1)");
37 shouldThrow("context.createBuffer(1, 1, 1e6)"); 38 shouldThrow("context.createBuffer(1, 1, 1e6)");
38 // Check valid values from crbug.com/344375 39 // Check valid values from crbug.com/344375
39 shouldNotThrow("context.createBuffer(1, 1, 3000)"); 40 shouldNotThrow("context.createBuffer(1, 1, 3000)");
40 shouldNotThrow("context.createBuffer(1, 1, 192000)"); 41 shouldNotThrow("context.createBuffer(1, 1, 192000)");
41 // Invalid number of frames: NotSupportedError 42 // Invalid number of frames: NotSupportedError
42 shouldThrow("context.createBuffer(1, 0, context.sampleRate)"); 43 shouldThrow("context.createBuffer(1, 0, context.sampleRate)");
43 // 2-arg createBuffer not allowed. 44 // 2-arg createBuffer not allowed.
44 shouldThrow("context.createBuffer(new ArrayBuffer(100), true)"); 45 shouldThrow("context.createBuffer(new ArrayBuffer(100), true)");
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 shouldNotThrow("conv = oc.createConvolver()"); 182 shouldNotThrow("conv = oc.createConvolver()");
182 shouldThrow("conv.buffer = oc.createBuffer(1, 100, 22050)"); 183 shouldThrow("conv.buffer = oc.createBuffer(1, 100, 22050)");
183 } 184 }
184 185
185 runTest(); 186 runTest();
186 successfullyParsed = true; 187 successfullyParsed = true;
187 188
188 </script> 189 </script>
189 </body> 190 </body>
190 </html> 191 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/webaudio/dom-exceptions-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698