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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-fft-scaling.html

Issue 2708953003: Move task.describe descriptions to audit.define (Closed)
Patch Set: Address review comments. Created 3 years, 10 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 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/testharness.js"></script> 4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script> 5 <script src="../../resources/testharnessreport.js"></script>
6 <script src="../resources/audit-util.js"></script> 6 <script src="../resources/audit-util.js"></script>
7 <script src="../resources/audit.js"></script> 7 <script src="../resources/audit.js"></script>
8 </head> 8 </head>
9 9
10 <body> 10 <body>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 should(actualBin, (1 << order) + "-point FFT peak position") 61 should(actualBin, (1 << order) + "-point FFT peak position")
62 .beEqualTo(expectedBin); 62 .beEqualTo(expectedBin);
63 63
64 should(peakValue[index], (1 << order) + 64 should(peakValue[index], (1 << order) +
65 "-point FFT peak value in dBFS") 65 "-point FFT peak value in dBFS")
66 .beGreaterThanOrEqualTo(peakThreshold[index]); 66 .beGreaterThanOrEqualTo(peakThreshold[index]);
67 } 67 }
68 } 68 }
69 69
70 audit.define("FFT scaling tests", function (task, should) { 70 audit.define({
71 task.describe("Test Scaling of FFT in AnalyserNode"); 71 label: "FFT scaling tests",
72 description: "Test Scaling of FFT in AnalyserNode"
73 }, function (task, should) {
72 let tests = []; 74 let tests = [];
73 for (let k = 5; k <= 15; ++k) 75 for (let k = 5; k <= 15; ++k)
74 tests.push(runTest(k, should)); 76 tests.push(runTest(k, should));
75 77
76 // The order in which the tests finish is not important. 78 // The order in which the tests finish is not important.
77 Promise.all(tests) 79 Promise.all(tests)
78 .then(task.done.bind(task)); 80 .then(task.done.bind(task));
79 }); 81 });
80 82
81 function runTest(order, should) { 83 function runTest(order, should) {
(...skipping 15 matching lines...) Expand all
97 return context.startRendering() 99 return context.startRendering()
98 .then(function (audioBuffer) { 100 .then(function (audioBuffer) {
99 checkResult(audioBuffer, order, analyser); 101 checkResult(audioBuffer, order, analyser);
100 }); 102 });
101 } 103 }
102 104
103 audit.run(); 105 audit.run();
104 </script> 106 </script>
105 </body> 107 </body>
106 </html> 108 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698