Title: [123309] trunk/LayoutTests
- Revision
- 123309
- Author
- [email protected]
- Date
- 2012-07-23 00:53:19 -0700 (Mon, 23 Jul 2012)
Log Message
Improve AudioChannelSplitter test
https://bugs.webkit.org/show_bug.cgi?id=91962
Patch by Li Yin <[email protected]> on 2012-07-23
Reviewed by Kentaro Hara.
Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioChannelSplitter-section
The numberOfOutputs parameter determines the number of outputs.
Values of up to 32 must be supported. If not specified, then 6 will be used.
* webaudio/audiochannelsplitter-expected.txt:
* webaudio/audiochannelsplitter.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (123308 => 123309)
--- trunk/LayoutTests/ChangeLog 2012-07-23 04:55:58 UTC (rev 123308)
+++ trunk/LayoutTests/ChangeLog 2012-07-23 07:53:19 UTC (rev 123309)
@@ -1,3 +1,17 @@
+2012-07-23 Li Yin <[email protected]>
+
+ Improve AudioChannelSplitter test
+ https://bugs.webkit.org/show_bug.cgi?id=91962
+
+ Reviewed by Kentaro Hara.
+
+ Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioChannelSplitter-section
+ The numberOfOutputs parameter determines the number of outputs.
+ Values of up to 32 must be supported. If not specified, then 6 will be used.
+
+ * webaudio/audiochannelsplitter-expected.txt:
+ * webaudio/audiochannelsplitter.html:
+
2012-07-22 Li Yin <[email protected]>
Improve BiquadFilterNode test case
Modified: trunk/LayoutTests/webaudio/audiochannelsplitter-expected.txt (123308 => 123309)
--- trunk/LayoutTests/webaudio/audiochannelsplitter-expected.txt 2012-07-23 04:55:58 UTC (rev 123308)
+++ trunk/LayoutTests/webaudio/audiochannelsplitter-expected.txt 2012-07-23 07:53:19 UTC (rev 123309)
@@ -4,6 +4,11 @@
PASS Exception been thrown for numberOfOutputs <= 0.
PASS Exception been thrown for numberOfOutputs >= 32.
+PASS AudioChannelSplitter created successfully with numberOfOutputs = 32.
+PASS AudioChannelSplitter has 32 outputs when it is created with numberOfOutputs = 32.
+PASS AudioChannelSplitter has one input.
+PASS AudioChannelSplitter created successfully with empty parameter.
+PASS AudioChannelSplitter has 6 outputs when it is created with empty parameter.
PASS Correctly exchanged left and right channels.
PASS successfullyParsed is true
Modified: trunk/LayoutTests/webaudio/audiochannelsplitter.html (123308 => 123309)
--- trunk/LayoutTests/webaudio/audiochannelsplitter.html 2012-07-23 04:55:58 UTC (rev 123308)
+++ trunk/LayoutTests/webaudio/audiochannelsplitter.html 2012-07-23 07:53:19 UTC (rev 123309)
@@ -97,6 +97,33 @@
testPassed("Exception been thrown for numberOfOutputs >= 32.");
}
+ try {
+ var splitternode = context.createChannelSplitter(32);
+ testPassed("AudioChannelSplitter created successfully with numberOfOutputs = 32.");
+ if (splitternode.numberOfOutputs === 32)
+ testPassed("AudioChannelSplitter has 32 outputs when it is created with numberOfOutputs = 32.");
+ else
+ testFailed("AudioChannelSplitter should have 32 outputs when it is created with numberOfOutputs = 32.");
+
+ if (splitternode.numberOfInputs === 1)
+ testPassed("AudioChannelSplitter has one input.");
+ else
+ testFailed("AudioChannelSplitter should have one input.");
+ } catch(e) {
+ testFailed("Failed to create AudioChannelSplitter with numberOfInputs = 32.");
+ }
+
+ try {
+ var splitternode = context.createChannelSplitter();
+ testPassed("AudioChannelSplitter created successfully with empty parameter.");
+ if (splitternode.numberOfOutputs === 6)
+ testPassed("AudioChannelSplitter has 6 outputs when it is created with empty parameter.");
+ else
+ testFailed("AudioChannelSplitter should have 6 outputs when it is created with empty parameter.");
+ } catch(e) {
+ testFailed("Failed to create AudioChannelSplitter with empty parameter.");
+ }
+
// Create a stereo buffer, with all +1 values in left channel, all -1 in right channel.
sourceBuffer = createStereoBufferWithDCOffset(lengthInSampleFrames, sampleRate, 1);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes