| 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 src="resources/compatibility.js"></script> |
| 6 <script src="resources/audio-testing.js"></script> | 6 <script src="resources/audio-testing.js"></script> |
| 7 <title>Test OscillatorNode with Negative Frequency</title> | 7 <title>Test OscillatorNode with Negative Frequency</title> |
| 8 </head> | 8 </head> |
| 9 | 9 |
| 10 <body> | 10 <body> |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 oscPositive.start(); | 132 oscPositive.start(); |
| 133 oscNegative.start(); | 133 oscNegative.start(); |
| 134 | 134 |
| 135 context.startRendering().then(function (buffer) { | 135 context.startRendering().then(function (buffer) { |
| 136 var expected = buffer.getChannelData(0); | 136 var expected = buffer.getChannelData(0); |
| 137 var actual = buffer.getChannelData(1); | 137 var actual = buffer.getChannelData(1); |
| 138 | 138 |
| 139 Should("Sum of positive and negative frequency custom oscillators", | 139 Should("Sum of positive and negative frequency custom oscillators", |
| 140 actual, { | 140 actual, { |
| 141 verbose: true, | |
| 142 precision: 6 | 141 precision: 6 |
| 143 }) | 142 }) |
| 144 .beCloseToArray(expected, 4.7684e-7); | 143 .beCloseToArray(expected, 4.7684e-7); |
| 145 }).then(done); | 144 }).then(done); |
| 146 }); | 145 }); |
| 147 | 146 |
| 148 | 147 |
| 149 // All done! | 148 // All done! |
| 150 audit.defineTask("finish", function (done) { | 149 audit.defineTask("finish", function (done) { |
| 151 finishJSTest(); | 150 finishJSTest(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 var result = buffer.getChannelData(0); | 188 var result = buffer.getChannelData(0); |
| 190 | 189 |
| 191 var zero = new Float32Array(result.length); | 190 var zero = new Float32Array(result.length); |
| 192 zero.fill(0); | 191 zero.fill(0); |
| 193 Should(options.message, result).beCloseToArray(zero, options.threshold
|| 0); | 192 Should(options.message, result).beCloseToArray(zero, options.threshold
|| 0); |
| 194 }); | 193 }); |
| 195 } | 194 } |
| 196 </script> | 195 </script> |
| 197 </body> | 196 </body> |
| 198 </html> | 197 </html> |
| OLD | NEW |