| OLD | NEW |
| 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/js-test.js"></script> |
| 5 <script src="resources/compatibility.js"></script> |
| 5 <script type="text/javascript" src="resources/audio-testing.js"></script> | 6 <script type="text/javascript" src="resources/audio-testing.js"></script> |
| 6 </head> | 7 </head> |
| 7 | 8 |
| 8 <body> | 9 <body> |
| 9 | 10 |
| 10 <div id="description"></div> | 11 <div id="description"></div> |
| 11 <div id="console"></div> | 12 <div id="console"></div> |
| 12 | 13 |
| 13 <script> | 14 <script> |
| 14 description("Tests ScriptProcessorNode."); | 15 description("Tests ScriptProcessorNode."); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 78 |
| 78 function runTest() { | 79 function runTest() { |
| 79 if (window.testRunner) { | 80 if (window.testRunner) { |
| 80 testRunner.dumpAsText(); | 81 testRunner.dumpAsText(); |
| 81 testRunner.waitUntilDone(); | 82 testRunner.waitUntilDone(); |
| 82 } | 83 } |
| 83 | 84 |
| 84 window.jsTestIsAsync = true; | 85 window.jsTestIsAsync = true; |
| 85 | 86 |
| 86 // Create offline audio context. | 87 // Create offline audio context. |
| 87 context = new webkitOfflineAudioContext(2, renderLengthInFrames, sampleRate)
; | 88 context = new OfflineAudioContext(2, renderLengthInFrames, sampleRate); |
| 88 | 89 |
| 89 try { | 90 try { |
| 90 var jsnode = context.createScriptProcessor(512, 0, 0); | 91 var jsnode = context.createScriptProcessor(512, 0, 0); |
| 91 testFailed("Exception should be thrown when both numberOfInputChannels a
nd numberOfOutputChannels are zero."); | 92 testFailed("Exception should be thrown when both numberOfInputChannels a
nd numberOfOutputChannels are zero."); |
| 92 } catch(e) { | 93 } catch(e) { |
| 93 testPassed("Exception was thrown when both numberOfInputChannels and num
berOfOutputChannels are zero."); | 94 testPassed("Exception was thrown when both numberOfInputChannels and num
berOfOutputChannels are zero."); |
| 94 } | 95 } |
| 95 | 96 |
| 96 try { | 97 try { |
| 97 var jsnode = context.createScriptProcessor(512, 1, 0); | 98 var jsnode = context.createScriptProcessor(512, 1, 0); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 context.oncomplete = finishJSTest; | 152 context.oncomplete = finishJSTest; |
| 152 context.startRendering(); | 153 context.startRendering(); |
| 153 } | 154 } |
| 154 | 155 |
| 155 runTest(); | 156 runTest(); |
| 156 | 157 |
| 157 </script> | 158 </script> |
| 158 | 159 |
| 159 </body> | 160 </body> |
| 160 </html> | 161 </html> |
| OLD | NEW |