| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 | 3 |
| 4 <head> | 4 <head> |
| 5 <script src="../../resources/js-test.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
| 6 <script src="../../resources/testharnessreport.js"></script> |
| 6 <script src="../resources/audit-util.js"></script> | 7 <script src="../resources/audit-util.js"></script> |
| 7 <script src="../resources/audio-testing.js"></script> | 8 <script src="../resources/audio-testing.js"></script> |
| 8 </head> | 9 </head> |
| 9 | 10 |
| 10 <body> | 11 <body> |
| 11 <script> | 12 <script> |
| 12 description('Test disconnect() method on AudioParam destination.'); | |
| 13 window.jsTestIsAsync = true; | |
| 14 | 13 |
| 15 var renderQuantum = 128; | 14 var renderQuantum = 128; |
| 16 | 15 |
| 17 var sampleRate = 44100; | 16 var sampleRate = 44100; |
| 18 var renderDuration = 0.5; | 17 var renderDuration = 0.5; |
| 19 var disconnectTime = 0.5 * renderDuration; | 18 var disconnectTime = 0.5 * renderDuration; |
| 20 | 19 |
| 21 var audit = Audit.createTaskRunner(); | 20 var audit = Audit.createTaskRunner(); |
| 22 | 21 |
| 23 // Calculate the index for disconnection. | 22 // Calculate the index for disconnection. |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 190 |
| 192 // When both arguments are wrong, throw IndexSizeError first. | 191 // When both arguments are wrong, throw IndexSizeError first. |
| 193 Should('splitter.disconnect(gain1.gain, 2)', function () { | 192 Should('splitter.disconnect(gain1.gain, 2)', function () { |
| 194 splitter.disconnect(gain1.gain, 2); | 193 splitter.disconnect(gain1.gain, 2); |
| 195 }).throw('IndexSizeError'); | 194 }).throw('IndexSizeError'); |
| 196 | 195 |
| 197 done(); | 196 done(); |
| 198 }); | 197 }); |
| 199 | 198 |
| 200 audit.defineTask('finish', function (done) { | 199 audit.defineTask('finish', function (done) { |
| 201 finishJSTest(); | |
| 202 done(); | 200 done(); |
| 203 }); | 201 }); |
| 204 | 202 |
| 205 audit.runTasks( | 203 audit.runTasks( |
| 206 'disconnect(AudioParam)', | 204 'disconnect(AudioParam)', |
| 207 'disconnect(AudioParam, output)', | 205 'disconnect(AudioParam, output)', |
| 208 'exceptions', | 206 'exceptions', |
| 209 'finish' | 207 'finish' |
| 210 ); | 208 ); |
| 211 | 209 |
| 212 successfullyParsed = true; | 210 successfullyParsed = true; |
| 213 </script> | 211 </script> |
| 214 </body> | 212 </body> |
| 215 | 213 |
| 216 </html> | 214 </html> |
| OLD | NEW |