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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/WaveShaper/waveshaper-simple.html

Issue 2895963003: Apply layout-test-tidy to LayoutTests/webaudio (Closed)
Patch Set: Created 3 years, 7 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>Simple Tests of WaveShaperNode</title> 4 <title>
5 Simple Tests of WaveShaperNode
6 </title>
5 <script src="../../resources/testharness.js"></script> 7 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 8 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../resources/audit-util.js"></script> 9 <script src="../resources/audit-util.js"></script>
8 <script src="../resources/audit.js"></script> 10 <script src="../resources/audit.js"></script>
9 </head> 11 </head>
12 <body>
13 <script id="layout-test-code">
14 let audit = Audit.createTaskRunner();
10 15
11 <body> 16 audit.define('simple', (task, should) => {
12 <script> 17 let context = new OfflineAudioContext(1, 1, 48000);
13 var audit = Audit.createTaskRunner(); 18 let shaper = context.createWaveShaper();
14
15 audit.define("simple", (task, should) => {
16 var context = new OfflineAudioContext(1, 1, 48000);
17 var shaper = context.createWaveShaper();
18 19
19 // Verify default values are correct. 20 // Verify default values are correct.
20 should(shaper.curve, "WaveShaper.curve").beEqualTo(null); 21 should(shaper.curve, 'WaveShaper.curve').beEqualTo(null);
21 should(shaper.oversample, "WaveShaper.oversample").beEqualTo("none"); 22 should(shaper.oversample, 'WaveShaper.oversample').beEqualTo('none');
22 23
23 // Set oversample and verify that it is set correctly. 24 // Set oversample and verify that it is set correctly.
24 shaper.oversample = "2x"; 25 shaper.oversample = '2x';
25 should(shaper.oversample, 'Waveshaper.oversample = "2x"').beEqualTo("2x" ); 26 should(shaper.oversample, 'Waveshaper.oversample = "2x"')
27 .beEqualTo('2x');
26 28
27 shaper.oversample = "4x"; 29 shaper.oversample = '4x';
28 should(shaper.oversample, 'Waveshaper.oversample = "4x"').beEqualTo("4x" ); 30 should(shaper.oversample, 'Waveshaper.oversample = "4x"')
31 .beEqualTo('4x');
29 32
30 shaper.oversample = "invalid"; 33 shaper.oversample = 'invalid';
31 should(shaper.oversample, 'Waveshaper.oversample = "invalid"').beEqualTo ("4x"); 34 should(shaper.oversample, 'Waveshaper.oversample = "invalid"')
35 .beEqualTo('4x');
32 36
33 // Set the curve and verify that the returned curve is the same as what 37 // Set the curve and verify that the returned curve is the same as what
34 // it was set to. 38 // it was set to.
35 var curve = Float32Array.from([-1, 0.25, .75]); 39 let curve = Float32Array.from([-1, 0.25, .75]);
36 shaper.curve = curve; 40 shaper.curve = curve;
37 should(shaper.curve, "WaveShaper.curve").beEqualToArray(curve); 41 should(shaper.curve, 'WaveShaper.curve').beEqualToArray(curve);
38 42
39 // Verify setting the curve to null works. 43 // Verify setting the curve to null works.
40 shaper.curve = null; 44 shaper.curve = null;
41 should(shaper.curve, "Waveshaper.curve = null").beEqualTo(null); 45 should(shaper.curve, 'Waveshaper.curve = null').beEqualTo(null);
42 46
43 task.done(); 47 task.done();
44 }); 48 });
45 49
46 audit.run(); 50 audit.run();
47 </script> 51 </script>
48 </body> 52 </body>
49 </html> 53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698