Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(749)

Issue 720293002: Replace oscillator tests with more robust tests (Closed)

Created:
6 years, 1 month ago by Raymond Toy
Modified:
6 years, 1 month ago
CC:
blink-reviews
Project:
blink
Visibility:
Public.

Description

Replace oscillator tests with a more robust testing method that is less sensitive to small differences caused by floating-point operations. Instead of requiring exact results, we compare the actual result against a reference. Three criteria are used to pass the test: 1. The SNR between the actual and expected results must be large enough. 2. The maximum absolute difference must be less than a small threshold 3. The actual number of differences must be less than some number. If any of these fail, the test fails. oscillator-testing.js is updated to include a comment on how to generate new reference files in case they need to be generated again. This is a follow-up to https://codereview.chromium.org/720293002/ that does the same thing for the remaining oscillator tests. BUG=320099, 309197 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185543

Patch Set 1 : #

Total comments: 1

Patch Set 2 : Refactor according to review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+323 lines, -270 lines) Patch
M LayoutTests/TestExpectations View 2 chunks +0 lines, -6 lines 0 comments Download
D LayoutTests/platform/android/webaudio/oscillator-custom-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/android/webaudio/oscillator-square-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/linux-x86/webaudio/oscillator-custom-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/linux-x86/webaudio/oscillator-sawtooth-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/linux-x86/webaudio/oscillator-square-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/linux-x86/webaudio/oscillator-triangle-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/linux/webaudio/oscillator-custom-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/linux/webaudio/oscillator-sawtooth-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/linux/webaudio/oscillator-square-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/linux/webaudio/oscillator-triangle-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/win/webaudio/oscillator-custom-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/win/webaudio/oscillator-sawtooth-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/win/webaudio/oscillator-sine-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/win/webaudio/oscillator-square-expected.wav View Binary file 0 comments Download
D LayoutTests/platform/win/webaudio/oscillator-triangle-expected.wav View Binary file 0 comments Download
A LayoutTests/webaudio/osc-custom-sweep-snr.html View 1 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/webaudio/osc-custom-sweep-snr-expected.txt View 1 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/webaudio/osc-sawtooth-sweep-snr.html View 1 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/webaudio/osc-sawtooth-sweep-snr-expected.txt View 1 1 chunk +12 lines, -0 lines 0 comments Download
M LayoutTests/webaudio/osc-sine-sweep-snr.html View 1 1 chunk +6 lines, -114 lines 0 comments Download
M LayoutTests/webaudio/osc-sine-sweep-snr-expected.txt View 1 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/webaudio/osc-square-sweep-snr.html View 1 1 chunk +24 lines, -0 lines 0 comments Download
A LayoutTests/webaudio/osc-square-sweep-snr-expected.txt View 1 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/webaudio/osc-triangle-sweep-snr.html View 1 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/webaudio/osc-triangle-sweep-snr-expected.txt View 1 1 chunk +12 lines, -0 lines 0 comments Download
D LayoutTests/webaudio/oscillator-custom.html View 1 chunk +0 lines, -37 lines 0 comments Download
M LayoutTests/webaudio/oscillator-custom-expected.wav View Binary file 0 comments Download
D LayoutTests/webaudio/oscillator-sawtooth.html View 1 chunk +0 lines, -37 lines 0 comments Download
M LayoutTests/webaudio/oscillator-sawtooth-expected.wav View Binary file 0 comments Download
D LayoutTests/webaudio/oscillator-square.html View 1 chunk +0 lines, -37 lines 0 comments Download
M LayoutTests/webaudio/oscillator-square-expected.wav View Binary file 0 comments Download
D LayoutTests/webaudio/oscillator-triangle.html View 1 chunk +0 lines, -37 lines 0 comments Download
M LayoutTests/webaudio/oscillator-triangle-expected.wav View Binary file 0 comments Download
M LayoutTests/webaudio/resources/oscillator-testing.js View 1 3 chunks +171 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (5 generated)
Raymond Toy
PTAL
6 years, 1 month ago (2014-11-14 21:40:38 UTC) #5
Ken Russell (switch to Gerrit)
LGTM in general, but one comment. Sorry for the delay reviewing. https://codereview.chromium.org/720293002/diff/60001/LayoutTests/webaudio/osc-custom-sweep-snr.html File LayoutTests/webaudio/osc-custom-sweep-snr.html (right): ...
6 years, 1 month ago (2014-11-17 23:52:24 UTC) #6
Raymond Toy
On 2014/11/17 23:52:24, Ken Russell wrote: > LGTM in general, but one comment. Sorry for ...
6 years, 1 month ago (2014-11-18 18:05:43 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/720293002/80001
6 years, 1 month ago (2014-11-18 18:07:07 UTC) #9
commit-bot: I haz the power
6 years, 1 month ago (2014-11-18 19:17:38 UTC) #10
Message was sent while issue was closed.
Committed patchset #2 (id:80001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=185543

Powered by Google App Engine
This is Rietveld 408576698