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

Side by Side 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <script src="../resources/js-test.js"></script> 5 <script src="../resources/js-test.js"></script>
6 <script src="resources/compatibility.js"></script> 6 <script src="resources/compatibility.js"></script>
7 <script type="text/javascript" src="resources/audio-testing.js"></script> 7 <script type="text/javascript" src="resources/audio-testing.js"></script>
8 </head> 8 </head>
9 9
10 <body> 10 <body>
(...skipping 26 matching lines...) Expand all
37 if (compressor.knee.value == 30) 37 if (compressor.knee.value == 30)
38 testPassed("knee attribute has correct default value."); 38 testPassed("knee attribute has correct default value.");
39 else 39 else
40 testFailed("knee attribute has incorrect default value."); 40 testFailed("knee attribute has incorrect default value.");
41 41
42 if (compressor.ratio.value == 12) 42 if (compressor.ratio.value == 12)
43 testPassed("ratio attribute has correct default value."); 43 testPassed("ratio attribute has correct default value.");
44 else 44 else
45 testFailed("ratio attribute has incorrect default value."); 45 testFailed("ratio attribute has incorrect default value.");
46 46
47 if (compressor.attack.value - 0.003 < 3e-8) 47 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?
48 testPassed("attack attribute has correct default value."); 48 testPassed("attack attribute has correct default value.");
49 else 49 else
50 testFailed("attack attribute has incorrect default value."); 50 testFailed("attack attribute has incorrect default value.");
51 51
52 if (compressor.release.value - 0.25 < 3e-8) 52 if (compressor.release.value === 0.25)
53 testPassed("release attribute has correct default value."); 53 testPassed("release attribute has correct default value.");
54 else 54 else
55 testFailed("release attribute has incorrect default value."); 55 testFailed("release attribute has incorrect default value.");
56 56
57 if (typeof compressor.reduction === "number") {
58 testPassed("reduction attribute is a number.")
59 if (compressor.reduction == 0)
60 testPassed("reduction attribute has correct default value.")
61 } else {
62 testFailed("reduction attribute is an " + compressor.reduction.const ructor.name + " not a number.");
63 }
64
57 } catch(e) { 65 } catch(e) {
58 testFailed("Exception thrown when accessing DynamicsCompressorNode attri butes."); 66 testFailed("Exception thrown when accessing DynamicsCompressorNode attri butes.");
59 } 67 }
60 68
61 finishJSTest(); 69 finishJSTest();
62 } 70 }
63 71
64 runTest(); 72 runTest();
65 73
66 </script> 74 </script>
67 75
68 </body> 76 </body>
69 </html> 77 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698