OLD | NEW |
1 <!doctype html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Test Oscillator Node: custom</title> | 4 <title> |
| 5 Test Oscillator Node: custom |
| 6 </title> |
5 <script src="../../resources/testharness.js"></script> | 7 <script src="../../resources/testharness.js"></script> |
6 <script src="../../resources/testharnessreport.js"></script> | 8 <script src="../../resources/testharnessreport.js"></script> |
7 <script src="../resources/audit-util.js"></script> | 9 <script src="../resources/audit-util.js"></script> |
8 <script src="../resources/audit.js"></script> | 10 <script src="../resources/audit.js"></script> |
9 <script src="../resources/buffer-loader.js"></script> | 11 <script src="../resources/buffer-loader.js"></script> |
10 <script src="../resources/oscillator-testing.js"></script> | 12 <script src="../resources/oscillator-testing.js"></script> |
11 </head> | 13 </head> |
| 14 <body> |
| 15 <script id="layout-test-code"> |
| 16 let audit = Audit.createTaskRunner(); |
| 17 let tester = OscillatorTestingUtils; |
12 | 18 |
13 <body> | 19 audit.define('test', (task, should) => { |
14 <script> | 20 let context = new OfflineAudioContext( |
15 let audit = Audit.createTaskRunner(); | 21 1, tester.sampleRate * tester.lengthInSeconds, tester.sampleRate); |
16 var tester = OscillatorTestingUtils; | |
17 | |
18 audit.define("test", (task, should) => { | |
19 let context = new OfflineAudioContext(1, tester.sampleRate * | |
20 tester.lengthInSeconds, tester.sampleRate); | |
21 | 22 |
22 // The thresholds are experimentally determined. | 23 // The thresholds are experimentally determined. |
23 tester.setThresholds({ | 24 tester.setThresholds({snr: 93.445, maxDiff: 0.00004}); |
24 snr: 93.445, | 25 tester.runTest( |
25 maxDiff: 0.00004 | 26 context, 'custom', 'Custom Oscillator with Exponential Sweep', task, |
26 }); | 27 should); |
27 tester.runTest(context, "custom", | |
28 "Custom Oscillator with Exponential Sweep", task, should); | |
29 }); | 28 }); |
30 | 29 |
31 audit.run(); | 30 audit.run(); |
32 </script> | 31 </script> |
33 </body> | 32 </body> |
34 </html> | 33 </html> |
OLD | NEW |