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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/ScriptProcessor/scriptprocessornode-0-output-channels.html

Issue 2862413003: Convert ScriptProcessorNode tests to us new Audit (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
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/ScriptProcessor/scriptprocessor-offlineaudiocontext.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Test Connecting 0-output channel ScriptProcessor to Another Node </ti tle> 4 <title>Test Connecting 0-output channel ScriptProcessor to Another Node </ti tle>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../resources/audit-util.js"></script> 7 <script src="../resources/audit-util.js"></script>
8 <script src="../resources/audio-testing.js"></script> 8 <script src="../resources/audit.js"></script>
9 </head> 9 </head>
10 10
11 <body> 11 <body>
12 <script> 12 <script>
13 var audit = Audit.createTaskRunner(); 13 var audit = Audit.createTaskRunner();
14 var context; 14 var context;
15 var scriptNode1; 15 var scriptNode1;
16 var scriptNode2; 16 var scriptNode2;
17 var analyzer; 17 var analyzer;
18 18
19 audit.defineTask("initialize", function (done) { 19 audit.define('initialize', (task, should) => {
20 Should("context = new OfflineAudioContext(1, 1024, 44100)", function () { 20 should(function() {
21 context = new OfflineAudioContext(1, 1024, 44100); 21 context = new OfflineAudioContext(1, 1024, 44100);
22 }).notThrow(); 22 }, 'context = new OfflineAudioContext(1, 1024, 44100)').notThrow();
23 Should("analyzer = context.createAnalyser()", function () { 23 should(function() {
24 analyzer = context.createAnalyser(); 24 analyzer = context.createAnalyser();
25 }).notThrow(); 25 }, 'analyzer = context.createAnalyser()').notThrow();
26 Should("scriptNode1 = context.createScriptProcessor(1024, 11, 0)", funct ion () { 26 should(
27 scriptNode1 = context.createScriptProcessor(1024, 11, 0); 27 function() {
28 }).notThrow(); 28 scriptNode1 = context.createScriptProcessor(1024, 11, 0);
29 Should("scriptNode2 = context.createScriptProcessor(1024, 1, 1)", functi on () { 29 },
30 scriptNode2 = context.createScriptProcessor(1024, 1, 1); 30 'scriptNode1 = context.createScriptProcessor(1024, 11, 0)')
31 }).notThrow(); 31 .notThrow();
32 done(); 32 should(
33 function() {
34 scriptNode2 = context.createScriptProcessor(1024, 1, 1);
35 },
36 'scriptNode2 = context.createScriptProcessor(1024, 1, 1)')
37 .notThrow();
38 task.done();
33 }); 39 });
34 40
35 audit.defineTask("test", function (done) { 41 audit.define('test', (task, should) => {
36 Should("scriptNode1.connect(analyzer)", function () { 42 should(function() {
37 scriptNode1.connect(analyzer); 43 scriptNode1.connect(analyzer);
38 }).throw("InvalidAccessError"); 44 }, 'scriptNode1.connect(analyzer)').throw('InvalidAccessError');
39 Should("scriptNode2.connect(analyzer)", function () { 45 should(function() {
40 scriptNode2.connect(analyzer); 46 scriptNode2.connect(analyzer);
41 }).notThrow(); 47 }, 'scriptNode2.connect(analyzer)').notThrow();
42 done(); 48 task.done();
43 }); 49 });
44 50
45 audit.runTasks(); 51 audit.run();
46 </script> 52 </script>
47 </body> 53 </body>
48 </html> 54 </html>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/ScriptProcessor/scriptprocessor-offlineaudiocontext.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698