| Index: LayoutTests/webaudio/audiocontext-max-contexts.html
|
| diff --git a/LayoutTests/webaudio/audiocontext-max-contexts.html b/LayoutTests/webaudio/audiocontext-max-contexts.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4a3044866eb93078bfa3b0c143f8df6ae81dd1f6
|
| --- /dev/null
|
| +++ b/LayoutTests/webaudio/audiocontext-max-contexts.html
|
| @@ -0,0 +1,23 @@
|
| +<!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>
|
|
|