| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 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> | |
| 6 </head> | 5 </head> |
| 7 <body> | 6 <body> |
| 8 <script> | 7 <script> |
| 9 description("Tests the OfflineAudioContext constructor"); | 8 description("Tests the OfflineAudioContext constructor"); |
| 10 | 9 |
| 11 var context; | 10 var context; |
| 12 // Make sure we don't crash when giving 0 as number of frames. | 11 // Make sure we don't crash when giving 0 as number of frames. |
| 13 shouldThrow("new OfflineAudioContext(1, 0, 44100)"); | 12 shouldThrow("new OfflineAudioContext(1, 0, 44100)"); |
| 14 // Make sure we don't throw exceptions for supported ranges of sample rates for
an OfflineAudioContext. | 13 // Make sure we don't throw exceptions for supported ranges of sample rates for
an OfflineAudioContext. |
| 15 shouldThrow("context = new OfflineAudioContext(2, 512, 2999)"); | 14 shouldThrow("context = new OfflineAudioContext(2, 512, 2999)"); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 39 shouldThrow("context = new OfflineAudioContext(1, 0, Infinity)"); | 38 shouldThrow("context = new OfflineAudioContext(1, 0, Infinity)"); |
| 40 // Verify channel counts and other destination attributes are set correctly. | 39 // Verify channel counts and other destination attributes are set correctly. |
| 41 shouldNotThrow("context = new OfflineAudioContext(7, 512, 48000)"); | 40 shouldNotThrow("context = new OfflineAudioContext(7, 512, 48000)"); |
| 42 shouldBeEqualToNumber("context.destination.channelCount", 7); | 41 shouldBeEqualToNumber("context.destination.channelCount", 7); |
| 43 shouldBeEqualToNumber("context.destination.maxChannelCount", 7); | 42 shouldBeEqualToNumber("context.destination.maxChannelCount", 7); |
| 44 shouldBeEqualToString("context.destination.channelCountMode", "explicit"); | 43 shouldBeEqualToString("context.destination.channelCountMode", "explicit"); |
| 45 shouldBeEqualToString("context.destination.channelInterpretation", "speakers"); | 44 shouldBeEqualToString("context.destination.channelInterpretation", "speakers"); |
| 46 </script> | 45 </script> |
| 47 </body> | 46 </body> |
| 48 </html> | 47 </html> |
| OLD | NEW |