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

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

Issue 2895963003: Apply layout-test-tidy to LayoutTests/webaudio (Closed)
Patch Set: Created 3 years, 7 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/testharness.js"></script> 4 <title>
5 <script src="../../resources/testharnessreport.js"></script> 5 audiocontext-max-contexts.html
6 <script src="../resources/audit-util.js"></script> 6 </title>
7 <script src="../resources/audit.js"></script> 7 <script src="../../resources/testharness.js"></script>
8 </head> 8 <script src="../../resources/testharnessreport.js"></script>
9 <body> 9 <script src="../resources/audit-util.js"></script>
10 <script> 10 <script src="../resources/audit.js"></script>
11 let audit = Audit.createTaskRunner(); 11 </head>
12 <body>
13 <script id="layout-test-code">
14 let audit = Audit.createTaskRunner();
12 15
13 let contextsToCreate = 10; 16 let contextsToCreate = 10;
14 17
15 function reachHardwareContextsLimit() { 18 function reachHardwareContextsLimit() {
16 let context = []; 19 let context = [];
17 for (let i = 0; i < contextsToCreate; ++i) 20 for (let i = 0; i < contextsToCreate; ++i)
18 context[i] = new AudioContext(); 21 context[i] = new AudioContext();
19 } 22 }
20 23
21 24
22 audit.define( 25 audit.define(
23 { 26 {
24 label: 'hardware-context-limit', 27 label: 'hardware-context-limit',
25 description: 'AudioContext throws when hardware context limit is reached' 28 description:
26 }, 29 'AudioContext throws when hardware context limit is reached'
27 function(task, should) {
28 should(
29 function() {
30 reachHardwareContextsLimit();
31 }, 30 },
32 'Create ' + contextsToCreate + ' concurrent AudioContext\'s') 31 function(task, should) {
33 .throw('NotSupportedError'); 32 should(
33 function() {
34 reachHardwareContextsLimit();
35 },
36 'Create ' + contextsToCreate + ' concurrent AudioContext\'s')
37 .throw('NotSupportedError');
34 38
35 task.done(); 39 task.done();
36 }); 40 });
37 41
38 audit.run(); 42 audit.run();
39 </script> 43 </script>
40 </body> 44 </body>
41 </html> 45 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698