| 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/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/audio-testing.js"></script> | 6 <script src="resources/audio-testing.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 24 matching lines...) Expand all Loading... |
| 35 context = new AudioContext(); | 35 context = new AudioContext(); |
| 36 otherContext = new AudioContext(); | 36 otherContext = new AudioContext(); |
| 37 | 37 |
| 38 // Test creation of various objects | 38 // Test creation of various objects |
| 39 | 39 |
| 40 // Invalid number of channels: NotSupportedError | 40 // Invalid number of channels: NotSupportedError |
| 41 shouldThrow("context.createBuffer(99, 1, context.sampleRate)"); | 41 shouldThrow("context.createBuffer(99, 1, context.sampleRate)"); |
| 42 shouldThrow("context.createBuffer(0, 1, context.sampleRate)"); | 42 shouldThrow("context.createBuffer(0, 1, context.sampleRate)"); |
| 43 // Invalid sample rate: NotSupportedError | 43 // Invalid sample rate: NotSupportedError |
| 44 shouldThrow("context.createBuffer(1, 1, 1)"); | 44 shouldThrow("context.createBuffer(1, 1, 1)"); |
| 45 shouldThrow("context.createBuffer(1, 1, 2999)"); |
| 46 shouldThrow("context.createBuffer(1, 1, 384001)"); |
| 45 shouldThrow("context.createBuffer(1, 1, 1e6)"); | 47 shouldThrow("context.createBuffer(1, 1, 1e6)"); |
| 46 // Check valid values from crbug.com/344375 | 48 // Check valid values from crbug.com/344375 |
| 47 shouldNotThrow("context.createBuffer(1, 1, 3000)"); | 49 shouldNotThrow("context.createBuffer(1, 1, 3000)"); |
| 48 shouldNotThrow("context.createBuffer(1, 1, 192000)"); | 50 shouldNotThrow("context.createBuffer(1, 1, 192000)"); |
| 51 shouldNotThrow("context.createBuffer(1, 1, 384000)"); |
| 49 // Invalid number of frames: NotSupportedError | 52 // Invalid number of frames: NotSupportedError |
| 50 shouldThrow("context.createBuffer(1, 0, context.sampleRate)"); | 53 shouldThrow("context.createBuffer(1, 0, context.sampleRate)"); |
| 51 // 2-arg createBuffer not allowed. | 54 // 2-arg createBuffer not allowed. |
| 52 shouldThrow("context.createBuffer(new ArrayBuffer(100), true)"); | 55 shouldThrow("context.createBuffer(new ArrayBuffer(100), true)"); |
| 53 // Invalid sources (unspecified error) | 56 // Invalid sources (unspecified error) |
| 54 shouldThrow("context.createMediaElementSource(null)"); | 57 shouldThrow("context.createMediaElementSource(null)"); |
| 55 shouldThrow("context.createMediaStreamSource(null)"); | 58 shouldThrow("context.createMediaStreamSource(null)"); |
| 56 // Invalid buffer size: IndexSizeError | 59 // Invalid buffer size: IndexSizeError |
| 57 shouldThrow("context.createScriptProcessor(1, 1, 1)"); | 60 shouldThrow("context.createScriptProcessor(1, 1, 1)"); |
| 58 // Invalid number of inputs and outputs: IndexSizeError | 61 // Invalid number of inputs and outputs: IndexSizeError |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 shouldBeUndefined("source.noteOn"); | 327 shouldBeUndefined("source.noteOn"); |
| 325 shouldBeUndefined("source.noteOff"); | 328 shouldBeUndefined("source.noteOff"); |
| 326 } | 329 } |
| 327 | 330 |
| 328 runTest(); | 331 runTest(); |
| 329 successfullyParsed = true; | 332 successfullyParsed = true; |
| 330 | 333 |
| 331 </script> | 334 </script> |
| 332 </body> | 335 </body> |
| 333 </html> | 336 </html> |
| OLD | NEW |