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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/osc-low-freq.html

Issue 2072313002: Replace verbose option with brief option for Should(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust message for default verbose output. 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 unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Test Custom Oscillator at Very Low Frequency</title> 4 <title>Test Custom Oscillator at Very Low Frequency</title>
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 src="resources/audio-testing.js"></script> 7 <script src="resources/audio-testing.js"></script>
8 </head> 8 </head>
9 9
10 <body> 10 <body>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 for (var k = 0; k < actual.length; ++k) { 46 for (var k = 0; k < actual.length; ++k) {
47 var x = Math.cos(omega * k); 47 var x = Math.cos(omega * k);
48 var diff = x - actual[k]; 48 var diff = x - actual[k];
49 signal += x * x; 49 signal += x * x;
50 noise += diff * diff; 50 noise += diff * diff;
51 } 51 }
52 52
53 var snr = 10 * Math.log10(signal / noise); 53 var snr = 10 * Math.log10(signal / noise);
54 54
55 Should("SNR of " + desiredFrequencyHz + " Hz sine wave", snr).beGreaterT hanOrEqualTo(snrThreshold); 55 Should("SNR of " + desiredFrequencyHz + " Hz sine wave", snr, {
56 brief: true
57 }).beGreaterThanOrEqualTo(snrThreshold);
56 testPassed("PeriodicWave coefficients that must be ignored were correctl y ignored."); 58 testPassed("PeriodicWave coefficients that must be ignored were correctl y ignored.");
57 } 59 }
58 60
59 function runTest() { 61 function runTest() {
60 context = new OfflineAudioContext(1, sampleRate, sampleRate); 62 context = new OfflineAudioContext(1, sampleRate, sampleRate);
61 osc = context.createOscillator(); 63 osc = context.createOscillator();
62 64
63 // Create the custom oscillator. For simplicity of testing, we use just a cosine wave, but 65 // Create the custom oscillator. For simplicity of testing, we use just a cosine wave, but
64 // the initial elements of the real and imaginary parts are explicitly s et to non-zero to 66 // the initial elements of the real and imaginary parts are explicitly s et to non-zero to
65 // test that they are ignored. 67 // test that they are ignored.
(...skipping 12 matching lines...) Expand all
78 context.startRendering().then(function (buffer) { 80 context.startRendering().then(function (buffer) {
79 checkCosineResult(buffer, desiredFrequencyHz, sampleRate); 81 checkCosineResult(buffer, desiredFrequencyHz, sampleRate);
80 }).then(finishJSTest); 82 }).then(finishJSTest);
81 }; 83 };
82 84
83 runTest(); 85 runTest();
84 successfullyParsed = true; 86 successfullyParsed = true;
85 </script> 87 </script>
86 </body> 88 </body>
87 </html> 89 </html>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/iirfilter.html ('k') | third_party/WebKit/LayoutTests/webaudio/osc-negative-freq.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698