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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/AudioContext/audiocontext-max-contexts.html

Issue 2616623006: Convert audiocontext-close-basic and max-contexts to testharness (Closed)
Patch Set: Clean up Created 3 years, 11 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 unified diff | Download patch
OLDNEW
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/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 <script src="../resources/audit-util.js"></script>
7 <script src="../resources/audit.js"></script>
5 </head> 8 </head>
6 <body> 9 <body>
7 <script> 10 <script>
8 description("Check that the AudioContext constructor throws when the limit on ha rdware contexts is reached."); 11 let audit = Audit.createTaskRunner();
12
13 let contextsToCreate = 10;
9 14
10 function reachHardwareContextsLimit() { 15 function reachHardwareContextsLimit() {
11 var context = []; 16 let context = [];
12 for (var i=0; i<10; ++i) 17 for (let i = 0; i < contextsToCreate; ++i)
13 context[i] = new AudioContext(); 18 context[i] = new AudioContext();
14 } 19 }
15 20
16 shouldThrow("reachHardwareContextsLimit()"); 21
22 audit.define("test-limit", function (task, should) {
23 task.describe(
24 "Check that the AudioContext constructor throws when the limit on hardware c ontexts is reached."
25 );
26 should(function () {
27 reachHardwareContextsLimit();
28 }, "Create " + contextsToCreate + " concurrent AudioContext's")
29 .throw("NotSupportedError");
30
31 task.done();
32 });
33
34 audit.run();
17 </script> 35 </script>
18 </body> 36 </body>
19 </html> 37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698