Changeset 123662 in webkit
- Timestamp:
- Jul 25, 2012, 2:33:53 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r123659 r123662 1 2012-07-25 Li Yin <li.yin@intel.com> 2 3 It is invalid when both numberOfInputChannels and numberOfOutputChannels to be zero in JavaScriptAudioNode. 4 https://bugs.webkit.org/show_bug.cgi?id=91364 5 6 Reviewed by Kenneth Russell. 7 8 Add tests for (numberOfInputChannels, numberOfOutputChannels) to be (0, 0),(0, 1),(0, 2),(1, 0) and (2, 0). 9 10 * webaudio/javascriptaudionode-expected.txt: 11 * webaudio/javascriptaudionode.html: 12 1 13 2012-07-25 Andrew Wilson <atwilson@chromium.org> 2 14 -
trunk/LayoutTests/webaudio/javascriptaudionode-expected.txt
r114196 r123662 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 4 5 PASS Exception was thrown for illegal numberOfOutputChannels. 5 PASS Exception was thrown when both numberOfInputChannels and numberOfOutputChannels are zero. 6 PASS Successfully created JavaScriptAudioNode with numberOfInputChannels = 1 and numberOfOutputChannels = 0. 7 PASS Successfully created JavaScriptAudioNode with numberOfInputChannels = 2 and numberOfOutputChannels = 0. 8 PASS Successfully created JavaScriptAudioNode with numberOfInputChannels = 0 and numberOfOutputChannels = 1. 9 PASS Successfully created JavaScriptAudioNode with numberOfInputChannels = 0 and numberOfOutputChannels = 2. 6 10 PASS Exception was thrown for illegal bufferSize. 7 11 PASS Successfully created JavaScriptAudioNode with bufferSize = 256. -
trunk/LayoutTests/webaudio/javascriptaudionode.html
r120521 r123662 1 1 <!DOCTYPE html> 2 3 2 <html> 4 3 <head> … … 89 88 90 89 try { 90 var jsnode = context.createJavaScriptNode(512, 0, 0); 91 testFailed("Exception should be thrown when both numberOfInputChannels and numberOfOutputChannels are zero."); 92 } catch(e) { 93 testPassed("Exception was thrown when both numberOfInputChannels and numberOfOutputChannels are zero."); 94 } 95 96 try { 91 97 var jsnode = context.createJavaScriptNode(512, 1, 0); 92 test Failed("Exception should be thrown for illegal numberOfOutputChannels.");98 testPassed("Successfully created JavaScriptAudioNode with numberOfInputChannels = 1 and numberOfOutputChannels = 0."); 93 99 } catch(e) { 94 test Passed("Exception was thrown for illegal numberOfOutputChannels.");100 testFailed("Exception should not be thrown when numberOfInputChannels = 1 and numberOfOutputChannels = 0."); 95 101 } 96 102 103 try { 104 var jsnode = context.createJavaScriptNode(512, 2, 0); 105 testPassed("Successfully created JavaScriptAudioNode with numberOfInputChannels = 2 and numberOfOutputChannels = 0."); 106 } catch(e) { 107 testFailed("Exception should not be thrown when numberOfInputChannels = 2 and numberOfOutputChannels = 0."); 108 } 109 110 try { 111 var jsnode = context.createJavaScriptNode(512, 0, 1); 112 testPassed("Successfully created JavaScriptAudioNode with numberOfInputChannels = 0 and numberOfOutputChannels = 1."); 113 } catch(e) { 114 testFailed("Exception should not be thrown when numberOfInputChannels = 0 and numberOfOutputChannels = 1."); 115 } 116 117 try { 118 var jsnode = context.createJavaScriptNode(512, 0, 2); 119 testPassed("Successfully created JavaScriptAudioNode with numberOfInputChannels = 0 and numberOfOutputChannels = 2."); 120 } catch(e) { 121 testFailed("Exception should not be thrown when numberOfInputChannels = 0 and numberOfOutputChannels = 2."); 122 } 123 97 124 try { 98 125 var jsnode = context.createJavaScriptNode(511, 1, 1); -
trunk/Source/WebCore/ChangeLog
r123654 r123662 1 2012-07-25 Li Yin <li.yin@intel.com> 2 3 It is invalid when both numberOfInputChannels and numberOfOutputChannels to be zero in JavaScriptAudioNode. 4 https://bugs.webkit.org/show_bug.cgi?id=91364 5 6 Reviewed by Kenneth Russell. 7 8 Spec: http://www.w3.org/TR/webaudio/#JavaScriptAudioNode-section 9 It is invalid for both numberOfInputChannels and numberOfOutputChannels to be zero. 10 11 Test: webaudio/javascriptaudionode.html 12 13 * Modules/webaudio/JavaScriptAudioNode.cpp: 14 (WebCore::JavaScriptAudioNode::create): 15 1 16 2012-07-24 Shawn Singh <shawnsingh@chromium.org> 2 17 -
trunk/Source/WebCore/Modules/webaudio/JavaScriptAudioNode.cpp
r116465 r123662 59 59 } 60 60 61 if (!numberOfInputChannels && !numberOfOutputChannels) 62 return 0; 63 61 64 if (numberOfInputChannels > AudioContext::maxNumberOfChannels()) 62 65 return 0; 63 66 64 if ( !numberOfOutputChannels ||numberOfOutputChannels > AudioContext::maxNumberOfChannels())67 if (numberOfOutputChannels > AudioContext::maxNumberOfChannels()) 65 68 return 0; 66 69
Note:
See TracChangeset
for help on using the changeset viewer.