| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script> | 7 <script> |
| 8 description("Check that the AudioContext constructor throws when the limit on ha
rdware contexts is reached."); | 8 description("Check that the AudioContext constructor throws when the limit on ha
rdware contexts is reached."); |
| 9 | 9 |
| 10 function reachHardwareContextsLimit() { | 10 function reachHardwareContextsLimit() { |
| 11 var context = []; | 11 var context = []; |
| 12 for (var i=0; i<10; ++i) { | 12 for (var i=0; i<10; ++i) { |
| 13 context[i] = new webkitAudioContext(); | 13 context[i] = new webkitAudioContext(); |
| 14 // Trigger lazy initialization. | 14 // Trigger lazy initialization. |
| 15 context[i].createBufferSource(); | 15 context[i].createBufferSource(); |
| 16 } | 16 } |
| 17 } | 17 } |
| 18 | 18 |
| 19 shouldThrow("reachHardwareContextsLimit()"); | 19 shouldThrow("reachHardwareContextsLimit()"); |
| 20 </script> | 20 </script> |
| 21 </body> | 21 </body> |
| 22 </html> | 22 </html> |
| OLD | NEW |