Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: LayoutTests/webaudio/audiocontext-max-contexts.html

Issue 27037002: Get rid of custom bindings for AudioContext's constructor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/webaudio/audiocontext-max-contexts-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/webaudio/audiocontext-max-contexts-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698