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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/IIRFilter/iirfilter-basic.html

Issue 2791133002: bindings: Explicitly pass ValueType to toImplArray (Closed)
Patch Set: Fix tests Created 3 years, 8 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 Basic IIRFilterNode Properties</title> 4 <title>Test Basic IIRFilterNode Properties</title>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../resources/audit-util.js"></script> 7 <script src="../resources/audit-util.js"></script>
8 <script src="../resources/audio-testing.js"></script> 8 <script src="../resources/audio-testing.js"></script>
9 </head> 9 </head>
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 }).throw("InvalidStateError") && success; 112 }).throw("InvalidStateError") && success;
113 113
114 success = Should("createIIRFilter(new Float32Array(10), [1])", function () { 114 success = Should("createIIRFilter(new Float32Array(10), [1])", function () {
115 // feedforward coefficients can't all be zero. 115 // feedforward coefficients can't all be zero.
116 context.createIIRFilter(new Float32Array(10), [1]); 116 context.createIIRFilter(new Float32Array(10), [1]);
117 }).throw("InvalidStateError") && success; 117 }).throw("InvalidStateError") && success;
118 118
119 success = Should("createIIRFilter([1], [1, NaN, Infinity])", function () { 119 success = Should("createIIRFilter([1], [1, NaN, Infinity])", function () {
120 // Feedback coefficients must be finite. 120 // Feedback coefficients must be finite.
121 context.createIIRFilter([1], [1, Infinity, NaN]); 121 context.createIIRFilter([1], [1, Infinity, NaN]);
122 }).throw("InvalidStateError") && success; 122 }).throw("TypeError") && success;
123 123
124 success = Should("createIIRFilter([1, NaN, Infinity], [1])", function () { 124 success = Should("createIIRFilter([1, NaN, Infinity], [1])", function () {
125 // Feedforward coefficients must be finite. 125 // Feedforward coefficients must be finite.
126 context.createIIRFilter([1, Infinity, NaN], [1]); 126 context.createIIRFilter([1, Infinity, NaN], [1]);
127 }).throw("InvalidStateError") && success; 127 }).throw("TypeError") && success;
128 128
129 success = Should("createIIRFilter([1, 'abc', []], [1])", function () { 129 success = Should("createIIRFilter([1, 'abc', []], [1])", function () {
130 // Test that random junk in the array is converted to NaN. 130 // Test that random junk in the array is converted to NaN.
131 context.createIIRFilter([1, "abc", []], [1]); 131 context.createIIRFilter([1, "abc", []], [1]);
132 }).throw("InvalidStateError") && success; 132 }).throw("TypeError") && success;
133 133
134 Should("Exceptions for createIIRFilter", success) 134 Should("Exceptions for createIIRFilter", success)
135 .summarize("were all correctly thrown", 135 .summarize("were all correctly thrown",
136 "were not all correctly thrown"); 136 "were not all correctly thrown");
137 done(); 137 done();
138 }); 138 });
139 139
140 audit.defineTask("exceptions-getFrequencyData", function (done) { 140 audit.defineTask("exceptions-getFrequencyData", function (done) {
141 // Create a really simple IIR filter. Doesn't much matter what. 141 // Create a really simple IIR filter. Doesn't much matter what.
142 var coef = Float32Array.from([1]); 142 var coef = Float32Array.from([1]);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 190
191 Should("getFrequencyResponse exceptions handled", success) 191 Should("getFrequencyResponse exceptions handled", success)
192 .summarize("correctly", "incorrectly"); 192 .summarize("correctly", "incorrectly");
193 done(); 193 done();
194 }); 194 });
195 195
196 audit.runTasks(); 196 audit.runTasks();
197 </script> 197 </script>
198 </body> 198 </body>
199 </html> 199 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698