Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html |
| diff --git a/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html b/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html |
| index 076beeeb6ed1b96ad42c64e35cd147cf2dc1a125..ca8bda5e3268c08eeec48268791753defaf56f5e 100644 |
| --- a/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html |
| +++ b/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html |
| @@ -2,21 +2,34 @@ |
| <html> |
| <head> |
| <title>Test Oscillator Node: custom</title> |
| + <script src="../../resources/testharness.js"></script> |
| + <script src="../../resources/testharnessreport.js"></script> |
| + <script src="../resources/audit-util.js"></script> |
| + <script src="../resources/audit.js"></script> |
| <script src="../resources/buffer-loader.js"></script> |
| - <script src="../../resources/js-test.js"></script> |
| <script src="../resources/oscillator-testing.js"></script> |
| </head> |
| <body> |
| <script> |
| - description("Test Custom Oscillator with Exponential Sweep"); |
| - |
| + let audit = Audit.createTaskRunner(); |
| var tester = OscillatorTestingUtils; |
|
hongchan
2017/02/07 18:18:53
var => let.
You changed this in other tests. So l
|
| - // The thresholds are experimentally determined. |
| - tester.setThresholds({snr: 80.21, maxDiff: 4.88, diffCount: 15016}); |
| - tester.runTest("custom"); |
| - successfullyParsed = true; |
| + audit.define("test", (task, should) => { |
| + let context = new OfflineAudioContext(1, tester.sampleRate * |
| + tester.lengthInSeconds, tester.sampleRate); |
| + |
| + // The thresholds are experimentally determined. |
| + tester.setThresholds({ |
| + snr: 80.21, |
| + maxDiff: 4.88, |
| + diffCount: 15016 |
| + }); |
| + tester.runTest(context, "custom", |
| + "Custom Oscillator with Exponential Sweep", task, should); |
| + }); |
| + |
| + audit.run(); |
| </script> |
| </body> |
| </html> |