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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/dom-exceptions.html

Issue 2758783002: Throw correct errors for invalid OfflineAudioContext values (Closed)
Patch Set: Regenerate test result Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/dom-exceptions-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/webaudio/dom-exceptions.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/dom-exceptions.html b/third_party/WebKit/LayoutTests/webaudio/dom-exceptions.html
index 3a90326c55352e1238988e656778892284ace94e..7991159c216cedd8b1180361f322a15b1c24b321 100644
--- a/third_party/WebKit/LayoutTests/webaudio/dom-exceptions.html
+++ b/third_party/WebKit/LayoutTests/webaudio/dom-exceptions.html
@@ -406,25 +406,33 @@ audit.define('offline-audio-context', (task, should) => {
() => new OfflineAudioContext(32, 100, context.sampleRate),
'new OfflineAudioContext(32, 100, context.sampleRate)')
.notThrow();
- // Invalid number of channels (unspecified error)
+ // Invalid number of channels
+ should(
+ () => new OfflineAudioContext(0, 100, context.sampleRate),
+ 'new OfflineAudioContext(0, 100, context.sampleRate)')
+ .throw('NotSupportedError');
should(
() => new OfflineAudioContext(99, 100, context.sampleRate),
'new OfflineAudioContext(99, 100, context.sampleRate)')
- .throw();
- // Invalid sample rate. (unspecified error)
+ .throw('NotSupportedError');
+ // Invalid sample rate.
should(
() => new OfflineAudioContext(1, 100, 1),
'new OfflineAudioContext(1, 100, 1)')
- .throw();
+ .throw('NotSupportedError');
should(
() => new OfflineAudioContext(1, 100, 1e6),
'new OfflineAudioContext(1, 100, 1e6)')
- .throw();
+ .throw('NotSupportedError');
// Invalid frame length (crbug.com/351277)
should(
() => new OfflineAudioContext(1, -88200000000000, 44100),
'new OfflineAudioContext(1, -88200000000000, 44100)')
- .throw();
+ .throw('NotSupportedError');
+ should(
+ () => new OfflineAudioContext(1, 0, 44100),
+ 'new OfflineAudioContext(1, 0, 44100)')
+ .throw('NotSupportedError');
task.done();
});
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/dom-exceptions-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698