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 // 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. |
12 shouldThrow("new OfflineAudioContext(1, 0, 44100)"); | 12 shouldThrow("new OfflineAudioContext(1, 0, 44100)"); |
13 // Make sure throwing exception about out of sample rate range. | |
14 shouldThrow("new OfflineAudioContext(2, 512, 4000)"); | |
15 shouldThrow("new OfflineAudioContext(2, 512, 98000)"); | |
Raymond Toy
2014/07/30 16:49:38
Aren't these two tests already covered in dom-exce
KhNo
2014/07/31 16:45:53
Yes, it can be replaced. I think it doesn't need t
| |
16 // Make sure we don't throw exception supported ranges of sample rate. | |
17 shouldNotThrow("new OfflineAudioContext(2, 512, 8000)"); | |
18 shouldNotThrow("new OfflineAudioContext(2, 512, 11025)"); | |
19 shouldNotThrow("new OfflineAudioContext(2, 512, 22050)"); | |
20 shouldNotThrow("new OfflineAudioContext(2, 512, 44100)"); | |
21 shouldNotThrow("new OfflineAudioContext(2, 512, 88200)"); | |
22 shouldNotThrow("new OfflineAudioContext(2, 512, 96000)"); | |
Raymond Toy
2014/07/30 16:49:38
Might as well add a test for 48000, which is anoth
KhNo
2014/07/31 16:45:53
I agree with you, if there are famous values shoul
Raymond Toy
2014/07/31 17:25:13
Just 48000 is enough for me.
| |
23 | |
13 </script> | 24 </script> |
14 </body> | 25 </body> |
15 </html> | 26 </html> |
OLD | NEW |