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 { |