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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/realtimeanalyser-multiple-calls.html

Issue 2567713002: Separating layout test utilities into audit-util.js (Closed)
Patch Set: Created 4 years 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 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../resources/js-test.js"></script> 4 <script src="../resources/js-test.js"></script>
5 <script src="resources/compatibility.js"></script> 5 <script src="resources/compatibility.js"></script>
6 <script src="resources/audit-util.js"></script>
6 <script src="resources/audio-testing.js"></script> 7 <script src="resources/audio-testing.js"></script>
7 <title>Test Multiple Calls to getFloatFrequencyData</title> 8 <title>Test Multiple Calls to getFloatFrequencyData</title>
8 </head> 9 </head>
9 10
10 <body> 11 <body>
11 <script> 12 <script>
12 description("Test AnalyserNode getFloatFrequencyData and getByteFrequencyD ata"); 13 description("Test AnalyserNode getFloatFrequencyData and getByteFrequencyD ata");
13 window.jsTestIsAsync = true; 14 window.jsTestIsAsync = true;
14 15
15 var sampleRate = 48000; 16 var sampleRate = 48000;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 var scale = 255 / (maxDecibels - minDecibels); 119 var scale = 255 / (maxDecibels - minDecibels);
119 120
120 return floatFreqData.map(function (x) { 121 return floatFreqData.map(function (x) {
121 var value = Math.floor(scale * (x - minDecibels)); 122 var value = Math.floor(scale * (x - minDecibels));
122 return Math.min(255, Math.max(0, value)); 123 return Math.min(255, Math.max(0, value));
123 }); 124 });
124 } 125 }
125 </script> 126 </script>
126 </body> 127 </body>
127 </html> 128 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698