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

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

Issue 2595633002: Convert Analyser tests to use testharness (Closed)
Patch Set: Remove blank line 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/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../resources/compatibility.js"></script> 6 <script src="../resources/compatibility.js"></script>
6 <script src="../resources/audit-util.js"></script> 7 <script src="../resources/audit-util.js"></script>
7 <script src="../resources/audio-testing.js"></script> 8 <script src="../resources/audio-testing.js"></script>
8 <title>Test getFloatFrequencyData With Zero Inputs</title> 9 <title>Test getFloatFrequencyData With Zero Inputs</title>
9 </head> 10 </head>
10 11
11 <body> 12 <body>
12 <script> 13 <script>
13 description("Test AnalyserNode getFloatFrequencyData With Zero-Valued Inpu t");
14 window.jsTestIsAsync = true;
15
16 var sampleRate = 48000; 14 var sampleRate = 48000;
17 15
18 // Render enough data to run the test. 16 // Render enough data to run the test.
19 var renderFrames = 2*1024; 17 var renderFrames = 2*1024;
20 var renderDuration = renderFrames / sampleRate; 18 var renderDuration = renderFrames / sampleRate;
21 19
22 var audit = Audit.createTaskRunner(); 20 var audit = Audit.createTaskRunner();
23 21
24 22
25 // Test that getFloatFrequencyData returns -Infinity when the input is all -zeroes. 23 // Test that getFloatFrequencyData returns -Infinity when the input is all -zeroes.
(...skipping 20 matching lines...) Expand all
46 analyser.getFloatFrequencyData(f); 44 analyser.getFloatFrequencyData(f);
47 45
48 Should("getFloatFrequencyData() with zero-valued input", f) 46 Should("getFloatFrequencyData() with zero-valued input", f)
49 .beConstantValueOf(-Infinity); 47 .beConstantValueOf(-Infinity);
50 }).then(context.resume.bind(context)); 48 }).then(context.resume.bind(context));
51 49
52 context.startRendering().then(done); 50 context.startRendering().then(done);
53 }); 51 });
54 52
55 audit.defineTask("finish", function (done) { 53 audit.defineTask("finish", function (done) {
56 finishJSTest();
57 done(); 54 done();
58 }); 55 });
59 56
60 audit.runTasks(); 57 audit.runTasks();
61 58
62 </script> 59 </script>
63 </body> 60 </body>
64 </html> 61 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698