Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 let tests = []; | 72 description: "Test Scaling of FFT in AnalyserNode" |
| 73 }, function (task, should) { let tests = []; | |
|
hongchan
2017/02/22 17:59:13
Oops. The following line popped up to here.
Raymond Toy
2017/02/22 19:34:09
Done.
| |
| 73 for (let k = 5; k <= 15; ++k) | 74 for (let k = 5; k <= 15; ++k) |
| 74 tests.push(runTest(k, should)); | 75 tests.push(runTest(k, should)); |
| 75 | 76 |
| 76 // The order in which the tests finish is not important. | 77 // The order in which the tests finish is not important. |
| 77 Promise.all(tests) | 78 Promise.all(tests) |
| 78 .then(task.done.bind(task)); | 79 .then(task.done.bind(task)); |
| 79 }); | 80 }); |
| 80 | 81 |
| 81 function runTest(order, should) { | 82 function runTest(order, should) { |
| 82 let context = new OfflineAudioContext(1, 1 << order, sampleRate); | 83 let context = new OfflineAudioContext(1, 1 << order, sampleRate); |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 97 return context.startRendering() | 98 return context.startRendering() |
| 98 .then(function (audioBuffer) { | 99 .then(function (audioBuffer) { |
| 99 checkResult(audioBuffer, order, analyser); | 100 checkResult(audioBuffer, order, analyser); |
| 100 }); | 101 }); |
| 101 } | 102 } |
| 102 | 103 |
| 103 audit.run(); | 104 audit.run(); |
| 104 </script> | 105 </script> |
| 105 </body> | 106 </body> |
| 106 </html> | 107 </html> |
| OLD | NEW |