blob: 4a3044866eb93078bfa3b0c143f8df6ae81dd1f6 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Check that the AudioContext constructor throws when the limit on hardware contexts is reached.");
function reachHardwareContextsLimit() {
var context = [];
for (var i=0; i<10; ++i) {
context[i] = new webkitAudioContext();
// Trigger lazy initialization.
context[i].createBufferSource();
}
}
shouldThrow("reachHardwareContextsLimit()");
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
</body>
</html>