Skip to content

Commit 68a2da3

Browse files
Li Yinwebkit-commit-queue
authored andcommitted
AudioNode test should cover numberOfInputs and numberOfOutputs of AudioDestinationNode
https://bugs.webkit.org/show_bug.cgi?id=90578 Patch by Li Yin <li.yin@intel.com> on 2012-07-04 Reviewed by Chris Rogers. Spec: http://www.w3.org/TR/webaudio/#AudioDestinationNode-section An AudioSourceNode has no inputs and a single output. An AudioDestinationNode has one input and no outputs. Currently, the test webaudio/audionode.html has covered AudioSourceNode, it is still required to cover AudioDestinationNode. * webaudio/audionode-expected.txt: * webaudio/audionode.html: Canonical link: https://commits.webkit.org/108435@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 6cc9b1d commit 68a2da3

3 files changed

Lines changed: 32 additions & 3 deletions

File tree

LayoutTests/ChangeLog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2012-07-04 Li Yin <li.yin@intel.com>
2+
3+
AudioNode test should cover numberOfInputs and numberOfOutputs of AudioDestinationNode
4+
https://bugs.webkit.org/show_bug.cgi?id=90578
5+
6+
Reviewed by Chris Rogers.
7+
8+
Spec: http://www.w3.org/TR/webaudio/#AudioDestinationNode-section
9+
An AudioSourceNode has no inputs and a single output.
10+
An AudioDestinationNode has one input and no outputs.
11+
Currently, the test webaudio/audionode.html has covered AudioSourceNode,
12+
it is still required to cover AudioDestinationNode.
13+
14+
* webaudio/audionode-expected.txt:
15+
* webaudio/audionode.html:
16+
117
2012-07-04 Yoshifumi Inoue <yosin@chromium.org>
218

319
Unreviewed Chromium gardening, drop test expectations for

LayoutTests/webaudio/audionode-expected.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ PASS audioNode.noteGrainOn() threw exception TypeError: Not enough arguments.
77
PASS audioNode.noteOff() threw exception TypeError: Not enough arguments.
88
PASS Source AudioNode has no inputs.
99
PASS Source AudioNode has one output.
10+
PASS Destination AudioNode has one input.
11+
PASS Destination AudioNode has no outputs.
1012
PASS connect() exception thrown for illegal destination AudioNode.
1113
PASS connect() exception thrown for illegal output index.
1214
PASS connect() exception thrown for illegal input index.

LayoutTests/webaudio/audionode.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,28 @@
3131
shouldThrow("audioNode.noteGrainOn()");
3232
shouldThrow("audioNode.noteOff()");
3333

34-
// Check number of inputs and outputs.
35-
if (audioNode.numberOfInputs == 0)
34+
// Check input and output numbers of AudioSourceNode.
35+
if (audioNode.numberOfInputs === 0)
3636
testPassed("Source AudioNode has no inputs.");
3737
else
3838
testFailed("Source AudioNode should not have inputs.");
3939

40-
if (audioNode.numberOfOutputs == 1)
40+
if (audioNode.numberOfOutputs === 1)
4141
testPassed("Source AudioNode has one output.");
4242
else
4343
testFailed("Source AudioNode should have one output.");
4444

45+
// Check input and output numbers of AudioDestinationNode
46+
if (context.destination.numberOfInputs === 1)
47+
testPassed("Destination AudioNode has one input.");
48+
else
49+
testFailed("Destination AudioNode should have one input.");
50+
51+
if (context.destination.numberOfOutputs === 0)
52+
testPassed("Destination AudioNode has no outputs.");
53+
else
54+
testFailed("Destination AudioNode should have no outputs.");
55+
4556
// Try calling connect() method with illegal values.
4657

4758
try {

0 commit comments

Comments
 (0)