| Index: third_party/WebKit/LayoutTests/webaudio/Panner/panner-rolloff-clamping.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/Panner/panner-rolloff-clamping.html b/third_party/WebKit/LayoutTests/webaudio/Panner/panner-rolloff-clamping.html
|
| index dd5a3e47824d59b08bdfa98e66a8a4d77fe1d9d5..44dd06bf61db026a76e16a41f2ca5fd0cf0d2ebb 100644
|
| --- a/third_party/WebKit/LayoutTests/webaudio/Panner/panner-rolloff-clamping.html
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/Panner/panner-rolloff-clamping.html
|
| @@ -5,7 +5,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>
|
| </head>
|
|
|
| <body>
|
| @@ -16,40 +16,40 @@
|
|
|
| var audit = Audit.createTaskRunner();
|
|
|
| - audit.defineTask("linear-clamp-low", function (taskDone) {
|
| - runTest({
|
| + audit.define("linear-clamp-low", (task, should) => {
|
| + runTest(should, {
|
| distanceModel: "linear",
|
| // Fairly arbitrary value outside the nominal range
|
| rolloffFactor: -1,
|
| clampedRolloff: 0
|
| - }).then(taskDone);
|
| + }).then(() => task.done());
|
| });
|
|
|
| - audit.defineTask("linear-clamp-high", function (taskDone) {
|
| - runTest({
|
| + audit.define("linear-clamp-high", (task, should) => {
|
| + runTest(should, {
|
| distanceModel: "linear",
|
| // Fairly arbitrary value outside the nominal range
|
| rolloffFactor: 2,
|
| clampedRolloff: 1
|
| - }).then(taskDone);
|
| + }).then(() => task.done());
|
| });
|
|
|
| - audit.defineTask("inverse-clamp", function (taskDone) {
|
| - runTest({
|
| + audit.define("inverse-clamp", (task, should) => {
|
| + runTest(should, {
|
| distanceModel: "inverse",
|
| // Fairly arbitrary value outside the nominal range
|
| rolloffFactor: -1,
|
| clampedRolloff: 0
|
| - }).then(taskDone);
|
| + }).then(() => task.done());
|
| });
|
|
|
| - audit.defineTask("exponential-clamp", function (taskDone) {
|
| - runTest({
|
| + audit.define("exponential-clamp", (task, should) => {
|
| + runTest(should, {
|
| distanceModel: "exponential",
|
| // Fairly arbitrary value outside the nominal range
|
| rolloffFactor: -2,
|
| clampedRolloff: 0
|
| - }).then(taskDone);
|
| + }).then(() => task.done());
|
| });
|
|
|
| // Test clamping of the rolloffFactor. The test is done by comparing the
|
| @@ -63,7 +63,7 @@
|
| // nominal range of the distance model.
|
| // clampedRolloff - The rolloffFactor (above) clamped to the nominal
|
| // range for the given distance model.
|
| - function runTest(options) {
|
| + function runTest(should, options) {
|
| // Offline context with two channels. The first channel is the panner
|
| // node under test. The second channel is the reference panner node.
|
| var context = new OfflineAudioContext(2, renderFrames, sampleRate);
|
| @@ -114,17 +114,12 @@
|
| var message = 'Panner distanceModel: "' + options.distanceModel +
|
| '", rolloffFactor: ' + options.rolloffFactor;
|
|
|
| - var success = Should(message, actual)
|
| + should(actual, message)
|
| .beEqualToArray(expected);
|
| -
|
| - Should(message, success)
|
| - .summarize(
|
| - "correctly clamped rolloffFactor to " + options.clampedRolloff,
|
| - "did not correctly clamp rolloffFactor to " + options.clampedRolloff);
|
| });
|
| }
|
|
|
| - audit.runTasks();
|
| + audit.run();
|
| </script>
|
| </body>
|
| </html>
|
|
|