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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-contexts.html

Issue 2675973003: Convert Oscillator sweep tests to testharness (Closed)
Patch Set: Move audit calls outside of tester 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> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Test Oscillator Node: sawtooth</title> 4 <title>Test Oscillator Node: sawtooth</title>
5 <script src="../../resources/js-test.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../resources/audit-util.js"></script>
8 <script src="../resources/audit.js"></script>
6 <script src="../resources/buffer-loader.js"></script> 9 <script src="../resources/buffer-loader.js"></script>
7 <script src="../resources/oscillator-testing.js"></script> 10 <script src="../resources/oscillator-testing.js"></script>
8 </head> 11 </head>
9 12
10 <body> 13 <body>
11 <script> 14 <script>
12 description("Test Builtin Oscillator PeriodicWave Tables");
13
14 // Create an offline context with a sample rate that is very different fro m the sample rate 15 // Create an offline context with a sample rate that is very different fro m the sample rate
15 // used in the OscillatorTestingUtils. This will create a internal Period icWave objects for 16 // used in the OscillatorTestingUtils. This will create a internal Period icWave objects for
16 // the Oscillator. This should not interfere with the oscillator test usi ng a different 17 // the Oscillator. This should not interfere with the oscillator test usi ng a different
17 // context with a different sample rate. 18 // context with a different sample rate.
18 19
19 var context = new OfflineAudioContext(1, 1, 3000); 20 var context = new OfflineAudioContext(1, 1, 3000);
20 var osc = context.createOscillator(); 21 var osc = context.createOscillator();
21 osc.type = "sawtooth"; 22 osc.type = "sawtooth";
22 osc = null; 23 osc = null;
23 24
24 // This test is identical to the test in osc-sawtooth-sweep-snr.html. 25 // This test is identical to the test in osc-sawtooth-sweep-snr.html.
25 var tester = OscillatorTestingUtils; 26 var tester = OscillatorTestingUtils;
26 27
27 // The thresholds are experimentally determined. 28 // The thresholds are experimentally determined.
28 tester.setThresholds({snr: 80.00, maxDiff: 4.06, diffCount: 15827}); 29 tester.setThresholds({snr: 80.00, maxDiff: 4.06, diffCount: 15827});
29 tester.runTest("sawtooth"); 30 tester.runTest("sawtooth", "Sawtooth PeriodicWave Test");
30 successfullyParsed = true;
31 </script> 31 </script>
32 </body> 32 </body>
33 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698