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