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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/resources/realtimeanalyser-testing.js

Issue 2777983002: Convert Analyser tests to use new Audit. (Closed)
Patch Set: Remove console.logs Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-zero.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/webaudio/resources/realtimeanalyser-testing.js
diff --git a/third_party/WebKit/LayoutTests/webaudio/resources/realtimeanalyser-testing.js b/third_party/WebKit/LayoutTests/webaudio/resources/realtimeanalyser-testing.js
index fe651adb8606227f2b85ba2ea4288fc37b21c3bb..7265827995cf24fc47f0678e340a2c0e9bb73fb0 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/realtimeanalyser-testing.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/realtimeanalyser-testing.js
@@ -82,7 +82,7 @@ function clipMagnitude(limit, x) {
// comparison threshold and |precision| for setting the printed precision. Setting |precision| to
// |undefined| means printing all digits. If |options.precision} doesn't exist, use a default
// precision.
-function compareFloatFreq(message, freqData, expectedFreq, options) {
+function compareFloatFreq(message, freqData, expectedFreq, should, options) {
// Any dB values below -100 is pretty much in the noise due to round-off in
// the (single-precisiion) FFT, so just clip those values to -100.
var lowerLimit = -100;
@@ -91,14 +91,7 @@ function compareFloatFreq(message, freqData, expectedFreq, options) {
var actual = freqData;
clipMagnitude(lowerLimit, actual);
- // Default precision for printing the FFT data. Distinguish between options.precision existing
- // or not. If it does, use whatever value is there, including undefined.
- var defaultPrecision = options.hasOwnProperty("precision") ? options.precision : 3;
-
- var success = Should(message, actual, {
- verbose: true,
- precision: defaultPrecision
- })
+ var success = should(actual, message)
.beCloseToArray(expectedFreq, {
relativeThreshold: options.floatRelError || 0,
});
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-zero.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698