| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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> |
| OLD | NEW |