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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/constructor/convolver.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>Test Constructor: Convolver</title> 4 <title>
5 Test Constructor: Convolver
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 <script src="audionodeoptions.js"></script> 11 <script src="audionodeoptions.js"></script>
10 </head> 12 </head>
13 <body>
14 <script id="layout-test-code">
15 let context;
11 16
12 <body> 17 let audit = Audit.createTaskRunner();
13 <script>
14 var context;
15
16 var audit = Audit.createTaskRunner();
17 18
18 audit.define('initialize', (task, should) => { 19 audit.define('initialize', (task, should) => {
19 context = initializeContext(should); 20 context = initializeContext(should);
20 task.done(); 21 task.done();
21 }); 22 });
22 23
23 audit.define('invalid constructor', (task, should) => { 24 audit.define('invalid constructor', (task, should) => {
24 testInvalidConstructor(should, 'ConvolverNode', context); 25 testInvalidConstructor(should, 'ConvolverNode', context);
25 task.done(); 26 task.done();
26 }); 27 });
(...skipping 23 matching lines...) Expand all
50 channelCountMode: { 51 channelCountMode: {
51 value: 'clamped-max', 52 value: 'clamped-max',
52 isFixed: true, 53 isFixed: true,
53 errorType: 'NotSupportedError' 54 errorType: 'NotSupportedError'
54 }, 55 },
55 }); 56 });
56 task.done(); 57 task.done();
57 }); 58 });
58 59
59 audit.define('nullable buffer', (task, should) => { 60 audit.define('nullable buffer', (task, should) => {
60 var node; 61 let node;
61 var options = {buffer: null}; 62 let options = {buffer: null};
62 63
63 should( 64 should(
64 () => { 65 () => {
65 node = new ConvolverNode(context, options); 66 node = new ConvolverNode(context, options);
66 }, 67 },
67 'node1 = new ConvolverNode(c, ' + JSON.stringify(options)) 68 'node1 = new ConvolverNode(c, ' + JSON.stringify(options))
68 .notThrow(); 69 .notThrow();
69 70
70 should(node.buffer, 'node1.buffer').beEqualTo(null); 71 should(node.buffer, 'node1.buffer').beEqualTo(null);
71 72
72 task.done(); 73 task.done();
73 }); 74 });
74 75
75 audit.define('construct with options', (task, should) => { 76 audit.define('construct with options', (task, should) => {
76 var buf = context.createBuffer(1, 1, context.sampleRate); 77 let buf = context.createBuffer(1, 1, context.sampleRate);
77 var options = {buffer: buf, disableNormalization: false}; 78 let options = {buffer: buf, disableNormalization: false};
78 79
79 var message = 80 let message =
80 'node = new ConvolverNode(c, ' + JSON.stringify(options) + ')'; 81 'node = new ConvolverNode(c, ' + JSON.stringify(options) + ')';
81 82
82 var node; 83 let node;
83 should(() => { 84 should(() => {
84 node = new ConvolverNode(context, options); 85 node = new ConvolverNode(context, options);
85 }, message).notThrow(); 86 }, message).notThrow();
86 87
87 should(node instanceof ConvolverNode, 'node1 instanceOf ConvolverNode') 88 should(node instanceof ConvolverNode, 'node1 instanceOf ConvolverNode')
88 .beEqualTo(true); 89 .beEqualTo(true);
89 should(node.buffer === options.buffer, 'node1.buffer === <buf>') 90 should(node.buffer === options.buffer, 'node1.buffer === <buf>')
90 .beEqualTo(true); 91 .beEqualTo(true);
91 should(node.normalize, 'node1.normalize') 92 should(node.normalize, 'node1.normalize')
92 .beEqualTo(!options.disableNormalization); 93 .beEqualTo(!options.disableNormalization);
(...skipping 22 matching lines...) Expand all
115 should(node.normalize, 'node3.normalize') 116 should(node.normalize, 'node3.normalize')
116 .beEqualTo(!options.disableNormalization); 117 .beEqualTo(!options.disableNormalization);
117 118
118 task.done(); 119 task.done();
119 }); 120 });
120 121
121 audit.run(); 122 audit.run();
122 </script> 123 </script>
123 </body> 124 </body>
124 </html> 125 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698