| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 | 3 |
| 4 <head> | 4 <head> |
| 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/audio-testing.js"></script> |
| 9 <script src="../resources/audioparam-testing.js"></script> | 9 <script src="../resources/audioparam-testing.js"></script> |
| 10 </head> | 10 </head> |
| 11 | 11 |
| 12 <body> | 12 <body> |
| 13 <script> | 13 <script> |
| 14 | 14 |
| 15 var sampleRate = 44100; | 15 var sampleRate = 8000; |
| 16 | 16 |
| 17 // Create a dummy array for setValueCurveAtTime method. | 17 // Create a dummy array for setValueCurveAtTime method. |
| 18 var curveArray = new Float32Array([5.0, 6.0]); | 18 var curveArray = new Float32Array([5.0, 6.0]); |
| 19 | 19 |
| 20 // AudioNode dictionary with associated dummy arguments. | 20 // AudioNode dictionary with associated dummy arguments. |
| 21 var methodDictionary = [ | 21 var methodDictionary = [ |
| 22 { name: 'setValueAtTime', args: [1.0, 0.0] }, | 22 { name: 'setValueAtTime', args: [1.0, 0.0] }, |
| 23 { name: 'linearRampToValueAtTime', args: [2.0, 1.0] }, | 23 { name: 'linearRampToValueAtTime', args: [2.0, 1.0] }, |
| 24 { name: 'exponentialRampToValueAtTime', args: [3.0, 2.0] }, | 24 { name: 'exponentialRampToValueAtTime', args: [3.0, 2.0] }, |
| 25 { name: 'setTargetAtTime', args: [4.0, 2.0, 0.5] }, | 25 { name: 'setTargetAtTime', args: [4.0, 2.0, 0.5] }, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 46 returned: sourceParam[method.name](...method.args), | 46 returned: sourceParam[method.name](...method.args), |
| 47 desc: sourceParam.constructor.name + '.' + method.name + '()' | 47 desc: sourceParam.constructor.name + '.' + method.name + '()' |
| 48 }); | 48 }); |
| 49 }); | 49 }); |
| 50 | 50 |
| 51 done(); | 51 done(); |
| 52 }); | 52 }); |
| 53 | 53 |
| 54 // Task: test method chaining with invalid operation. | 54 // Task: test method chaining with invalid operation. |
| 55 audit.defineTask('invalid-operation', function (done) { | 55 audit.defineTask('invalid-operation', function (done) { |
| 56 var context = new OfflineAudioContext(1, 44100, 44100); | 56 var context = new OfflineAudioContext(1, sampleRate, sampleRate); |
| 57 var osc = context.createOscillator(); | 57 var osc = context.createOscillator(); |
| 58 var amp1 = context.createGain(); | 58 var amp1 = context.createGain(); |
| 59 var amp2 = context.createGain(); | 59 var amp2 = context.createGain(); |
| 60 | 60 |
| 61 osc.connect(amp1); | 61 osc.connect(amp1); |
| 62 osc.connect(amp2); | 62 osc.connect(amp2); |
| 63 amp1.connect(context.destination); | 63 amp1.connect(context.destination); |
| 64 amp2.connect(context.destination); | 64 amp2.connect(context.destination); |
| 65 | 65 |
| 66 // The first operation fails with an exception, thus the second one | 66 // The first operation fails with an exception, thus the second one |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 done(); | 132 done(); |
| 133 }); | 133 }); |
| 134 | 134 |
| 135 audit.runTasks(); | 135 audit.runTasks(); |
| 136 | 136 |
| 137 successfullyParsed = true; | 137 successfullyParsed = true; |
| 138 </script> | 138 </script> |
| 139 </body> | 139 </body> |
| 140 | 140 |
| 141 </html> | 141 </html> |
| OLD | NEW |