| Index: third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-sampling.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-sampling.html b/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-sampling.html
|
| index eab5cd2979b475027fedd8ec8a85ed8b6d5b3c9a..930e2c96de40a9d617ff5248d0aa4516b9da3592 100644
|
| --- a/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-sampling.html
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-sampling.html
|
| @@ -4,7 +4,7 @@
|
| <script src="../../resources/testharness.js"></script>
|
| <script src="../../resources/testharnessreport.js"></script>
|
| <script src="../resources/audit-util.js"></script>
|
| - <script src="../resources/audio-testing.js"></script>
|
| + <script src="../resources/audit.js"></script>
|
| <script src="../resources/audioparam-testing.js"></script>
|
| <title>Test Sampling of LinearRampToValueAtTime</title>
|
| </head>
|
| @@ -17,7 +17,7 @@
|
|
|
| var audit = Audit.createTaskRunner();
|
|
|
| - function runTest(config) {
|
| + function runTest(should, config) {
|
| // Create a short context with a constant signal source connected to a gain node that will
|
| // be automated.
|
| context = new OfflineAudioContext(1, 256, sampleRate);
|
| @@ -55,17 +55,10 @@
|
| var expectedStart = config.expectedFunction(startFrame / sampleRate);
|
| var expectedEnd = config.expectedFunction(endFrame / sampleRate);
|
|
|
| - var success = Should(config.desc + ": Sample " + startFrame,
|
| - resultData[startFrame], {
|
| - precision: 7
|
| - }).beCloseTo(expectedStart, config.startValueThreshold);
|
| - success = Should(config.desc + ": Sample " + endFrame,
|
| - resultData[endFrame], {
|
| - precision: 7
|
| - }).beCloseTo(expectedEnd, config.endValueThreshold) && success;
|
| -
|
| - Should(config.desc, success)
|
| - .summarize("passed", "failed");
|
| + should(resultData[startFrame], config.desc + ": Sample " + startFrame)
|
| + .beCloseTo(expectedStart, {threshold: config.startValueThreshold});
|
| + should(resultData[endFrame], config.desc + ": Sample " + endFrame)
|
| + .beCloseTo(expectedEnd, {threshold: config.endValueThreshold});
|
| });
|
| }
|
|
|
| @@ -155,8 +148,8 @@
|
| ];
|
|
|
| function createTaskFunction(config) {
|
| - return function (done) {
|
| - runTest(config).then(done);
|
| + return (task, should) => {
|
| + runTest(should, config).then(() => task.done());
|
| };
|
| }
|
|
|
| @@ -164,15 +157,10 @@
|
| for (var k = 0; k < testConfigs.length; ++k) {
|
| var config = testConfigs[k];
|
| var taskName = config.desc + ":task" + k;
|
| - audit.defineTask(taskName, createTaskFunction(config));
|
| + audit.define(taskName, createTaskFunction(config));
|
| }
|
|
|
| - audit.defineTask("finish", function (done) {
|
| - done();
|
| - });
|
| -
|
| - audit.runTasks();
|
| - successfullyParsed = true;
|
| + audit.run();
|
| </script>
|
| </body>
|
| </html>
|
|
|