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

Unified 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698