| Index: third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-contexts.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-contexts.html b/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-contexts.html
|
| index 5ae3776048ad81a375b1cfb4ea612d3549c95373..9e16ba8e3e963aa19c6686faca2530cefa64883a 100644
|
| --- a/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-contexts.html
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-contexts.html
|
| @@ -2,32 +2,45 @@
|
| <html>
|
| <head>
|
| <title>Test Oscillator Node: sawtooth</title>
|
| - <script src="../../resources/js-test.js"></script>
|
| + <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/oscillator-testing.js"></script>
|
| </head>
|
|
|
| <body>
|
| <script>
|
| - description("Test Builtin Oscillator PeriodicWave Tables");
|
| + let audit = Audit.createTaskRunner();
|
|
|
| // Create an offline context with a sample rate that is very different from the sample rate
|
| // used in the OscillatorTestingUtils. This will create a internal PeriodicWave objects for
|
| // the Oscillator. This should not interfere with the oscillator test using a different
|
| // context with a different sample rate.
|
|
|
| - var context = new OfflineAudioContext(1, 1, 3000);
|
| - var osc = context.createOscillator();
|
| - osc.type = "sawtooth";
|
| - osc = null;
|
| + audit.define("test", (task, should) => {
|
| + let context0 = new OfflineAudioContext(1, 1, 3000);
|
| + let osc = context0.createOscillator();
|
| + osc.type = "sawtooth";
|
| + osc = null;
|
|
|
| - // This test is identical to the test in osc-sawtooth-sweep-snr.html.
|
| - var tester = OscillatorTestingUtils;
|
| + // This test is identical to the test in osc-sawtooth-sweep-snr.html.
|
| + let tester = OscillatorTestingUtils;
|
|
|
| - // The thresholds are experimentally determined.
|
| - tester.setThresholds({snr: 80.00, maxDiff: 4.06, diffCount: 15827});
|
| - tester.runTest("sawtooth");
|
| - successfullyParsed = true;
|
| + let context = new OfflineAudioContext(1, tester.sampleRate *
|
| + tester.lengthInSeconds, tester.sampleRate);
|
| + // The thresholds are experimentally determined.
|
| + tester.setThresholds({
|
| + snr: 80.00,
|
| + maxDiff: 4.06,
|
| + diffCount: 15827
|
| + });
|
| + tester.runTest(context, "sawtooth", "Sawtooth PeriodicWave Test",
|
| + task, should);
|
| + });
|
| +
|
| + audit.run();
|
| </script>
|
| </body>
|
| </html>
|
|
|