| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>Test Connecting 0-output channel ScriptProcessor to Another Node </ti
tle> | |
| 5 <script src="../resources/js-test.js"></script> | |
| 6 <script src="resources/compatibility.js"></script> | |
| 7 <script src="resources/audit-util.js"></script> | |
| 8 <script src="resources/audio-testing.js"></script> | |
| 9 </head> | |
| 10 | |
| 11 <body> | |
| 12 <script> | |
| 13 description("Test Connecting 0-output channel ScriptProcessor to Another N
ode"); | |
| 14 window.jsTestIsAsync = true; | |
| 15 | |
| 16 var audit = Audit.createTaskRunner(); | |
| 17 var context; | |
| 18 var scriptNode1; | |
| 19 var scriptNode2; | |
| 20 var analyzer; | |
| 21 | |
| 22 audit.defineTask("initialize", function (done) { | |
| 23 Should("context = new OfflineAudioContext(1, 1024, 44100)", function ()
{ | |
| 24 context = new OfflineAudioContext(1, 1024, 44100); | |
| 25 }).notThrow(); | |
| 26 Should("analyzer = context.createAnalyser()", function () { | |
| 27 analyzer = context.createAnalyser(); | |
| 28 }).notThrow(); | |
| 29 Should("scriptNode1 = context.createScriptProcessor(1024, 11, 0)", funct
ion () { | |
| 30 scriptNode1 = context.createScriptProcessor(1024, 11, 0); | |
| 31 }).notThrow(); | |
| 32 Should("scriptNode2 = context.createScriptProcessor(1024, 1, 1)", functi
on () { | |
| 33 scriptNode2 = context.createScriptProcessor(1024, 1, 1); | |
| 34 }).notThrow(); | |
| 35 done(); | |
| 36 }); | |
| 37 | |
| 38 audit.defineTask("test", function (done) { | |
| 39 Should("scriptNode1.connect(analyzer)", function () { | |
| 40 scriptNode1.connect(analyzer); | |
| 41 }).throw("InvalidAccessError"); | |
| 42 Should("scriptNode2.connect(analyzer)", function () { | |
| 43 scriptNode2.connect(analyzer); | |
| 44 }).notThrow(); | |
| 45 done(); | |
| 46 }); | |
| 47 | |
| 48 audit.defineTask("finish", function (done) { | |
| 49 done(); | |
| 50 finishJSTest(); | |
| 51 }); | |
| 52 | |
| 53 audit.runTasks( | |
| 54 "initialize", | |
| 55 "test", | |
| 56 "finish" | |
| 57 ); | |
| 58 </script> | |
| 59 </body> | |
| 60 </html> | |
| OLD | NEW |