| Index: third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-exceptions.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-exceptions.html b/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-exceptions.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..74415d423790f2c3661bff8297aa0fa50534e074
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-exceptions.html
|
| @@ -0,0 +1,46 @@
|
| +<!doctype html>
|
| +<html>
|
| + <head>
|
| + <title>Test PeriodicWave exceptions</title>
|
| + <script src="../../resources/testharness.js"></script>
|
| + <script src="../../resources/testharnessreport.js"></script>
|
| + <script src="../resources/audit-util.js"></script>
|
| + <script src="../resources/audit.js"></script>
|
| + </head>
|
| +
|
| + <body>
|
| + <script>
|
| + let audit = Audit.createTaskRunner();
|
| +
|
| + audit.define(
|
| + {
|
| + label: 'non-finite values',
|
| + description: 'Constructor should throw for non-finite coefficients'
|
| + },
|
| + (task, should) => {
|
| + // Arbitrary context for testing.
|
| + let context = new OfflineAudioContext(1, 1, 44100);
|
| +
|
| + should(
|
| + () => context.createPeriodicWave([1, Infinity], [1, 1]),
|
| + 'createPeriodicWave([1, Infinity], [1,1])')
|
| + .throw('TypeError');
|
| + should(
|
| + () => context.createPeriodicWave([1, NaN], [1, 1]),
|
| + 'createPeriodicWave([1, NaN], [1,1])')
|
| + .throw('TypeError');
|
| + should(
|
| + () => context.createPeriodicWave([1, 1], [1, Infinity]),
|
| + 'createPeriodicWave([1, 1], [1, Infinity])')
|
| + .throw('TypeError');
|
| + should(
|
| + () => context.createPeriodicWave([1, 1], [1, NaN]),
|
| + 'createPeriodicWave([1, 1], [1, NaN])')
|
| + .throw('TypeError');
|
| + task.done();
|
| + });
|
| +
|
| + audit.run();
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|