Chromium Code Reviews| 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..0ec16c8b471a350a63968fa0a92b7700803173cf |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-exceptions.html |
| @@ -0,0 +1,37 @@ |
| +<!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('non-finite values', (task, should) => { |
|
hongchan
2017/04/11 17:15:02
Can we have a brief comment what this task does?
Raymond Toy
2017/04/11 20:21:15
Done.
|
| + // 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> |