| Index: third_party/WebKit/LayoutTests/webaudio/DynamicsCompressor/dynamicscompressor-clear-internal-state.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/DynamicsCompressor/dynamicscompressor-clear-internal-state.html b/third_party/WebKit/LayoutTests/webaudio/DynamicsCompressor/dynamicscompressor-clear-internal-state.html
|
| index b90034c4e96766709e4a3dad1c6e668d25801575..65fc81ea0ca7b2ef9ae7e847416c97e6e54c9f48 100644
|
| --- a/third_party/WebKit/LayoutTests/webaudio/DynamicsCompressor/dynamicscompressor-clear-internal-state.html
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/DynamicsCompressor/dynamicscompressor-clear-internal-state.html
|
| @@ -2,45 +2,29 @@
|
| <html>
|
| <head>
|
| <title>Validate Reduction Value of DynamicsComporessor after Disabling</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/audio-testing.js"></script>
|
| + <script src="../resources/audit.js"></script>
|
| </head>
|
|
|
| <body>
|
| <script>
|
| - description("Validate Reduction Value of DynamicsComporessor after Disabling");
|
| -
|
| - var context;
|
| - var buffer;
|
| - var source;
|
| - var compressor;
|
| - var renderedData;
|
| -
|
| - var sampleRate = 44100;
|
| - var testDurationSamples = 44100;
|
| -
|
| - function checkResult (event) {
|
| -
|
| - renderedData = event.renderedBuffer.getChannelData(0);
|
| -
|
| - // Check that the reduction value is 0.0.
|
| - if (compressor.reduction !== 0.0) {
|
| - testFailed("Expected reduction of 0.0, but the value is " + compressor.reduction);
|
| - }
|
| - else {
|
| - testPassed("Reduction is 0.0");
|
| - }
|
| -
|
| - finishJSTest();
|
| - }
|
| -
|
| - function runTest() {
|
| - window.jsTestIsAsync = true;
|
| -
|
| + let audit = Audit.createTaskRunner();
|
| + let context;
|
| + let buffer;
|
| + let source;
|
| + let compressor;
|
| +
|
| + let sampleRate = 44100;
|
| + let testDurationSamples = 44100;
|
| +
|
| + audit.define("test", function (task, should) {
|
| + task.describe(
|
| + "Validate Reduction Value of DynamicsCompressor after Disabling"
|
| + );
|
| // Create the offline context for the test.
|
| context = new OfflineAudioContext(1, testDurationSamples, sampleRate);
|
| - context.oncomplete = checkResult;
|
|
|
| // Create the constant sample buffer of 0.5 sec.
|
| buffer = createConstantBuffer(context, testDurationSamples / 2, 1);
|
| @@ -56,11 +40,16 @@
|
| source.start(0.0);
|
|
|
| // Render it!
|
| - context.startRendering();
|
| - }
|
| -
|
| - runTest();
|
| - succesfullyParsed = true;
|
| + context.startRendering()
|
| + .then(() => {
|
| + // Check that the reduction value is 0.0.
|
| + should(compressor.reduction, "compressor.reduction")
|
| + .beEqualTo(0);
|
| + task.done();
|
| + });
|
| + });
|
| +
|
| + audit.run();
|
| </script>
|
| </body>
|
| </html>
|
|
|