[Web Audio] createScriptProcessor throws IndexSizeError for valid arguments
https://bugs.webkit.org/show_bug.cgi?id=173022
Reviewed by Sam Weinig.
Source/WebCore:
Updated test: webaudio/javascriptaudionode.html
The Web Audio spec (<https://webaudio.github.io/web-audio-api/>, 06 June 2017) defines a default behavior when
clients pass in a value of 0 for bufferSize to the createScriptProcessor() method.
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createScriptProcessor):
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::create):
* Modules/webaudio/ScriptProcessorNode.h:
LayoutTests:
* webaudio/javascriptaudionode-expected.txt:
* webaudio/javascriptaudionode.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@217919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 35a7734..2463cdb 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2017-06-07 Jer Noble <jer.noble@apple.com>
+
+ [Web Audio] createScriptProcessor throws IndexSizeError for valid arguments
+ https://bugs.webkit.org/show_bug.cgi?id=173022
+
+ Reviewed by Sam Weinig.
+
+ * webaudio/javascriptaudionode-expected.txt:
+ * webaudio/javascriptaudionode.html:
+
2017-06-07 Chris Dumez <cdumez@apple.com>
CSSStyleRule.style / CSSPageRule.style / CSSKeyframeRule.style should be settable
diff --git a/LayoutTests/webaudio/javascriptaudionode-expected.txt b/LayoutTests/webaudio/javascriptaudionode-expected.txt
index ed4bf82..7f1aad8 100644
--- a/LayoutTests/webaudio/javascriptaudionode-expected.txt
+++ b/LayoutTests/webaudio/javascriptaudionode-expected.txt
@@ -8,6 +8,7 @@
PASS Successfully created ScriptProcessorNode with numberOfInputChannels = 0 and numberOfOutputChannels = 1.
PASS Successfully created ScriptProcessorNode with numberOfInputChannels = 0 and numberOfOutputChannels = 2.
PASS Exception was thrown for illegal bufferSize.
+PASS Successfully created ScriptProcessorNode with bufferSize = 0.
PASS Successfully created ScriptProcessorNode with bufferSize = 256.
PASS Successfully created ScriptProcessorNode with bufferSize = 512.
PASS Successfully created ScriptProcessorNode with bufferSize = 1024.
diff --git a/LayoutTests/webaudio/javascriptaudionode.html b/LayoutTests/webaudio/javascriptaudionode.html
index 66a2e10..6dd4ecd 100644
--- a/LayoutTests/webaudio/javascriptaudionode.html
+++ b/LayoutTests/webaudio/javascriptaudionode.html
@@ -123,6 +123,7 @@
testPassed("Exception was thrown for illegal bufferSize.");
}
+ doBufferSizeTest(0);
doBufferSizeTest(256);
doBufferSizeTest(512);
doBufferSizeTest(1024);