|
|
Created:
4 years ago by Raymond Toy Modified:
3 years, 11 months ago Reviewers:
hongchan CC:
chromium-reviews, blink-reviews Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionConvert realtimeanalyser-basic to testharness
BUG=675987
TEST=realtimeanalyser-basic.html
Committed: https://crrev.com/2d859df1d2dd8bf6cce57c41c7fdbe70140b28b6
Cr-Commit-Position: refs/heads/master@{#441279}
Patch Set 1 #Patch Set 2 : Add task label. #Patch Set 3 : Remove unneeded expected result #Patch Set 4 : Rebase #
Messages
Total messages: 19 (10 generated)
rtoy@chromium.org changed reviewers: + hongchan@chromium.org
PTAL. The actual output is This is a testharness.js-based test. PASS # AUDIT TASK RUNNER STARTED. PASS Number of inputs for AnalyserNode is equal to 1. PASS Number of outputs for AnalyserNode is equal to 1. PASS Default minDecibels value is equal to -100. PASS Default maxDecibels value is equal to -30. PASS Default smoothingTimeConstant value is equal to 0.8. PASS node.minDecibels = -50.333333333333336 is equal to -50.333333333333336. PASS node.maxDecibels = -40.333333333333336 is equal to -40.333333333333336. PASS < [Basic AnalyserNode test] All assertions passed. (total 7 assertions) PASS # AUDIT TASK RUNNER FINISHED: 1 tasks ran successfully. Harness: the test ran to completion.
lgtm, but please fix the subject to include the name of the test.
On 2017/01/03 17:49:59, hongchan wrote: > lgtm, but please fix the subject to include the name of the test. Done. But I also forgot to remove the expected results file. I'll do that in a moment.
Description was changed from ========== Convert to testharness BUG=675987 TEST=realtimeanalyser-basic.html ========== to ========== Convert realtimeanalyser-basic to testharness BUG=675987 TEST=realtimeanalyser-basic.html ==========
The CQ bit was checked by rtoy@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from hongchan@chromium.org Link to the patchset: https://codereview.chromium.org/2598683002/#ps40001 (title: "Remove unneeded expected result")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-basic.html: While running git apply --index -p1; <stdin>:76: trailing whitespace. error: patch failed: third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-basic.html:1 error: third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-basic.html: patch does not apply Patch: third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-basic.html Index: third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-basic.html diff --git a/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-basic.html b/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-basic.html index bb2fca3f157246740535fe8e929f2cc0c4709eb8..49322d23d547e223bd93c3b7187f9a67dd1861c5 100644 --- a/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-basic.html +++ b/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-basic.html @@ -1,76 +1,55 @@ <!DOCTYPE html> <html> <head> -<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/compatibility.js"></script> +<script src="../resources/audit.js"></script> </head> <body> -<div id="description"></div> -<div id="console"></div> <script> -description("Basic tests for AnalyserNode."); var context = 0; -function runTest() { - if (window.testRunner) { - testRunner.dumpAsText(); - testRunner.waitUntilDone(); - } - - window.jsTestIsAsync = true; +var audit = Audit.createTaskRunner(); +audit.define("Basic AnalyserNode test", function (task, should) { context = new AudioContext(); var analyser = context.createAnalyser(); - if (analyser.numberOfInputs === 1) - testPassed("AnalyserNode has one input."); - else - testFailed("AnalyserNode should have one input, not " + analyser.numberOfInputs + "."); - - if (analyser.numberOfOutputs === 1) - testPassed("AnalyserNode has one output."); - else - testFailed("AnalyserNode should have one output."); + should(analyser.numberOfInputs, "Number of inputs for AnalyserNode") + .beEqualTo(1); - if (analyser.minDecibels === -100) - testPassed("minDecibels default value is -100."); - else - testFailed("minDecibels default value should be -100."); + should(analyser.numberOfOutputs, "Number of outputs for AnalyserNode") + .beEqualTo(1); - if (analyser.maxDecibels === -30) - testPassed("maxDecibels default value is -30."); - else - testFailed("maxDecibels default value should be -30."); + should(analyser.minDecibels, "Default minDecibels value") + .beEqualTo(-100); - if (analyser.smoothingTimeConstant === 0.8) - testPassed("smoothingTimeConstant default value is 0.8."); - else - testFailed("smoothingTimeConstant default value should be 0.8."); + should(analyser.maxDecibels, "Default maxDecibels value") + .beEqualTo(-30); + should(analyser.smoothingTimeConstant, "Default smoothingTimeConstant value") + .beEqualTo(0.8); + var expectedValue = -50 - (1/3); analyser.minDecibels = expectedValue; - if (analyser.minDecibels === expectedValue) - testPassed("minDecibels value is set to " + expectedValue + ".") - else - testFailed("minDecibels value should be set to " + expectedValue + ", not " + analyser.minDecibels + "."); + + should(analyser.minDecibels, "node.minDecibels = " + expectedValue) + .beEqualTo(expectedValue); expectedValue = -40 - (1/3); analyser.maxDecibels = expectedValue; - if (analyser.maxDecibels === expectedValue) - testPassed("maxDecibels value is set to " + expectedValue + ".") - else - testFailed("maxDecibels value should be set to " + expectedValue + ", not " + analyser.maxDecibels + "."); - finishJSTest(); -} + should(analyser.maxDecibels, "node.maxDecibels = " + expectedValue) + .beEqualTo(expectedValue); -runTest(); + task.done(); +}); +audit.run(); </script> </body>
The CQ bit was checked by rtoy@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from hongchan@chromium.org Link to the patchset: https://codereview.chromium.org/2598683002/#ps60001 (title: "Rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1483488630375710, "parent_rev": "5d31036aa28cd5b17eba4d31f48788efbf0da24d", "commit_rev": "f6df849de6e26346e51fb72f679672d28b4ae0e8"}
Message was sent while issue was closed.
Description was changed from ========== Convert realtimeanalyser-basic to testharness BUG=675987 TEST=realtimeanalyser-basic.html ========== to ========== Convert realtimeanalyser-basic to testharness BUG=675987 TEST=realtimeanalyser-basic.html Review-Url: https://codereview.chromium.org/2598683002 ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Convert realtimeanalyser-basic to testharness BUG=675987 TEST=realtimeanalyser-basic.html Review-Url: https://codereview.chromium.org/2598683002 ========== to ========== Convert realtimeanalyser-basic to testharness BUG=675987 TEST=realtimeanalyser-basic.html Committed: https://crrev.com/2d859df1d2dd8bf6cce57c41c7fdbe70140b28b6 Cr-Commit-Position: refs/heads/master@{#441279} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/2d859df1d2dd8bf6cce57c41c7fdbe70140b28b6 Cr-Commit-Position: refs/heads/master@{#441279} |