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

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

Issue 2033503004: Avoid slow AudioParam automation path when possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 6 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/audio-testing.js
diff --git a/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js b/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js
index 608d16a19e62260132a05dc4623e0649e968cc59..ebc337b26a69090d76881ea8dcab5b49c67dd971 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js
@@ -870,9 +870,9 @@ var Should = (function () {
maxAbsError = diff;
}
// Keep track of the location of the max relative error, ignoring cases where the
- // relative error is ininfinity (because the expected value = 0).
+ // relative error is NaN.
var relError = diff / Math.abs(expected[i]);
- if (isFinite(relError) && relError > maxRelError) {
+ if (!isNaN(relError) && relError > maxRelError) {
maxRelErrorIndex = i;
maxRelError = relError;
}

Powered by Google App Engine
This is Rietveld 408576698