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

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

Issue 2807673002: createPeriodicWave parameters are sequence<float> (Closed)
Patch Set: Rebaseline test 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
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <title>Test PeriodicWave exceptions</title>
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>
9 </head>
10
11 <body>
12 <script>
13 let audit = Audit.createTaskRunner();
14
15 audit.define(
16 {
17 label: 'non-finite values',
18 description: 'Constructor should throw for non-finite coefficients'
19 },
20 (task, should) => {
21 // Arbitrary context for testing.
22 let context = new OfflineAudioContext(1, 1, 44100);
23
24 should(
25 () => context.createPeriodicWave([1, Infinity], [1, 1]),
26 'createPeriodicWave([1, Infinity], [1,1])')
27 .throw('TypeError');
28 should(
29 () => context.createPeriodicWave([1, NaN], [1, 1]),
30 'createPeriodicWave([1, NaN], [1,1])')
31 .throw('TypeError');
32 should(
33 () => context.createPeriodicWave([1, 1], [1, Infinity]),
34 'createPeriodicWave([1, 1], [1, Infinity])')
35 .throw('TypeError');
36 should(
37 () => context.createPeriodicWave([1, 1], [1, NaN]),
38 'createPeriodicWave([1, 1], [1, NaN])')
39 .throw('TypeError');
40 task.done();
41 });
42
43 audit.run();
44 </script>
45 </body>
46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698