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

Unified Diff: LayoutTests/webaudio/audiobuffersource-channels.html

Issue 190953005: Support nullable buffer for AudioBufferSourceNode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | LayoutTests/webaudio/audiobuffersource-channels-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/webaudio/audiobuffersource-channels.html
diff --git a/LayoutTests/webaudio/audiobuffersource-channels.html b/LayoutTests/webaudio/audiobuffersource-channels.html
index 91322e20e5b0545980e31c72cd2375697cb56095..81526b1e9d2484e5ddf99de599a3b418881ade0d 100644
--- a/LayoutTests/webaudio/audiobuffersource-channels.html
+++ b/LayoutTests/webaudio/audiobuffersource-channels.html
@@ -29,7 +29,18 @@ function runTest() {
// Make sure we can't set to something which isn't an AudioBuffer.
shouldThrow("source.buffer = 57", '"TypeError: Failed to set the \'buffer\' property on \'AudioBufferSourceNode\': The provided value is not of type \'AudioBuffer\'."');
- shouldThrow("source.buffer = null", '"TypeError: Failed to set the \'buffer\' property on \'AudioBufferSourceNode\': buffer cannot be null"');
+
+ // Check that mono buffer can be set.
+ try {
+ var nullableBuffer = null;
+ source.buffer = nullableBuffer;
+ if (source.buffer.numberOfChannels == 1)
+ testPassed("Nullable buffer can be set.");
+ else
+ testFailed("Nullable buffer must be mono.");
+ } catch(e) {
+ testFailed("Nullable buffer can not be set.");
+ }
// Check that mono buffer can be set.
try {
« no previous file with comments | « no previous file | LayoutTests/webaudio/audiobuffersource-channels-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698