Title: [121877] trunk/LayoutTests
Revision
121877
Author
[email protected]
Date
2012-07-04 20:30:32 -0700 (Wed, 04 Jul 2012)

Log Message

AudioNode test should cover numberOfInputs and numberOfOutputs of AudioDestinationNode
https://bugs.webkit.org/show_bug.cgi?id=90578

Patch by Li Yin <[email protected]> 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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (121876 => 121877)


--- trunk/LayoutTests/ChangeLog	2012-07-05 01:54:50 UTC (rev 121876)
+++ trunk/LayoutTests/ChangeLog	2012-07-05 03:30:32 UTC (rev 121877)
@@ -1,3 +1,19 @@
+2012-07-04  Li Yin  <[email protected]>
+
+        AudioNode test should cover numberOfInputs and numberOfOutputs of AudioDestinationNode
+        https://bugs.webkit.org/show_bug.cgi?id=90578
+
+        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:
+
 2012-07-04  Yoshifumi Inoue  <[email protected]>
 
         Unreviewed Chromium gardening, drop test expectations for

Modified: trunk/LayoutTests/webaudio/audionode-expected.txt (121876 => 121877)


--- trunk/LayoutTests/webaudio/audionode-expected.txt	2012-07-05 01:54:50 UTC (rev 121876)
+++ trunk/LayoutTests/webaudio/audionode-expected.txt	2012-07-05 03:30:32 UTC (rev 121877)
@@ -7,6 +7,8 @@
 PASS audioNode.noteOff() threw exception TypeError: Not enough arguments.
 PASS Source AudioNode has no inputs.
 PASS Source AudioNode has one output.
+PASS Destination AudioNode has one input.
+PASS Destination AudioNode has no outputs.
 PASS connect() exception thrown for illegal destination AudioNode.
 PASS connect() exception thrown for illegal output index.
 PASS connect() exception thrown for illegal input index.

Modified: trunk/LayoutTests/webaudio/audionode.html (121876 => 121877)


--- trunk/LayoutTests/webaudio/audionode.html	2012-07-05 01:54:50 UTC (rev 121876)
+++ trunk/LayoutTests/webaudio/audionode.html	2012-07-05 03:30:32 UTC (rev 121877)
@@ -31,17 +31,28 @@
     shouldThrow("audioNode.noteGrainOn()");
     shouldThrow("audioNode.noteOff()");
 
-    // Check number of inputs and outputs.
-    if (audioNode.numberOfInputs == 0)
+    // Check input and output numbers of AudioSourceNode.
+    if (audioNode.numberOfInputs === 0)
         testPassed("Source AudioNode has no inputs.");
     else
         testFailed("Source AudioNode should not have inputs.");
     
-    if (audioNode.numberOfOutputs == 1)
+    if (audioNode.numberOfOutputs === 1)
         testPassed("Source AudioNode has one output.");
     else
         testFailed("Source AudioNode should have one output.");
 
+    // Check input and output numbers of AudioDestinationNode
+    if (context.destination.numberOfInputs === 1)
+        testPassed("Destination AudioNode has one input.");
+    else
+        testFailed("Destination AudioNode should have one input.");
+
+    if (context.destination.numberOfOutputs === 0)
+        testPassed("Destination AudioNode has no outputs.");
+    else
+        testFailed("Destination AudioNode should have no outputs.");
+
     // Try calling connect() method with illegal values.
 
     try {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to