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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/dynamicscompressor-basic.html

Issue 1807583002: DynamicsCompressor.reduction is a float not an AudioParam (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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/dynamicscompressor-basic.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/dynamicscompressor-basic.html b/third_party/WebKit/LayoutTests/webaudio/dynamicscompressor-basic.html
index 69d00748a9e5ba97a6abbdd88f223170359adb8a..37286cdbd3abed489ed15857cbc8f7f98a7096c9 100644
--- a/third_party/WebKit/LayoutTests/webaudio/dynamicscompressor-basic.html
+++ b/third_party/WebKit/LayoutTests/webaudio/dynamicscompressor-basic.html
@@ -44,16 +44,24 @@ function runTest() {
else
testFailed("ratio attribute has incorrect default value.");
- if (compressor.attack.value - 0.003 < 3e-8)
+ if (Math.abs(compressor.attack.value - 0.003) < 2.61e-11)
hongchan 2016/04/20 16:25:02 Please add comments what this number means.
Raymond Toy 2016/04/20 16:28:55 Which number?
hongchan 2016/04/21 17:32:33 Why did you change 3e-8 to 2.61e-11?
testPassed("attack attribute has correct default value.");
else
testFailed("attack attribute has incorrect default value.");
- if (compressor.release.value - 0.25 < 3e-8)
+ if (compressor.release.value === 0.25)
testPassed("release attribute has correct default value.");
else
testFailed("release attribute has incorrect default value.");
+ if (typeof compressor.reduction === "number") {
+ testPassed("reduction attribute is a number.")
+ if (compressor.reduction == 0)
+ testPassed("reduction attribute has correct default value.")
+ } else {
+ testFailed("reduction attribute is an " + compressor.reduction.constructor.name + " not a number.");
+ }
+
} catch(e) {
testFailed("Exception thrown when accessing DynamicsCompressorNode attributes.");
}

Powered by Google App Engine
This is Rietveld 408576698