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

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

Issue 2766883002: Allow status = 0 when XHR is completed in Audit.loadFileFromUrl(). (Closed)
Patch Set: Fixed threshold after revert 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
Index: third_party/WebKit/LayoutTests/webaudio/resources/oscillator-testing.js
diff --git a/third_party/WebKit/LayoutTests/webaudio/resources/oscillator-testing.js b/third_party/WebKit/LayoutTests/webaudio/resources/oscillator-testing.js
index 84543864681f079b5159231e48f68031c75d65d9..f2d8f9c0877b0d308fef596337c75589f29d7892 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/oscillator-testing.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/oscillator-testing.js
@@ -43,10 +43,6 @@ var thresholdSNR = 10000;
// Max diff must be less than this to pass the test.
var thresholdDiff = 0;
-// Count the number of differences between the expected and actual result. The tests passes
-// if the count is less than this threshold.
-var thresholdDiffCount = 0;
-
// Mostly for debugging
// An AudioBuffer for the reference (expected) result.
@@ -123,11 +119,6 @@ function checkResult (renderedBuffer, should, oscType) {
maxError = Math.abs(diff);
errorPosition = k;
}
- // The reference file is a 16-bit WAV file, so we will almost never get an exact match
- // between it and the actual floating-point result.
- if (diff > 0) {
- diffCount++;
- }
}
var snr = calculateSNR(signalPower, noisePower);
@@ -136,11 +127,6 @@ function checkResult (renderedBuffer, should, oscType) {
should(maxError, "Maximum difference")
.beLessThanOrEqualTo(thresholdDiff);
- should(diffCount,
- "Number of differences between actual and expected result out of "
- + renderedData.length + " frames")
- .beLessThanOrEqualTo(thresholdDiffCount);
-
var filename = "oscillator-" + oscType + "-actual.wav";
if (downloadAudioBuffer(renderedBuffer, filename, true))
should(true, "Saved reference file").message(filename, "");
@@ -161,7 +147,6 @@ return {
lengthInSeconds: lengthInSeconds,
thresholdSNR: thresholdSNR,
thresholdDiff: thresholdDiff,
- thresholdDiffCount: thresholdDiffCount,
waveScaleFactor: waveScaleFactor,
setThresholds: setThresholds,
runTest: runTest,

Powered by Google App Engine
This is Rietveld 408576698