Changeset 196130 in webkit
- Timestamp:
- Feb 4, 2016 10:03:34 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r196126 r196130 1 2016-02-04 Hyemi Shin <hyemi.sin@samsung.com> 2 3 Specify an exception for createChannelMerger, createChannelSplitter and createPeriodicWave 4 https://bugs.webkit.org/show_bug.cgi?id=150925 5 6 Reviewed by Darin Adler. 7 8 createChannelMerger and createChannelSplitter should throw INDEX_SIZE_ERR 9 for invalid numberOfInputs value. 10 createPeriodicWave should throw INDEX_SIZE_ERR for invalid lengths of parameters. 11 12 * webaudio/audiochannelmerger-basic-expected.txt: numberOfInputs could be 32. 13 * webaudio/audiochannelmerger-basic.html: Ditto. 14 * webaudio/audiochannelsplitter-expected.txt: Ditto. 15 * webaudio/audiochannelsplitter.html: Ditto. 16 * webaudio/periodicwave-lengths-expected.txt: Added. 17 * webaudio/periodicwave-lengths.html: Added. 18 1 19 2016-02-04 Ryan Haddad <ryanhaddad@apple.com> 2 20 -
trunk/LayoutTests/webaudio/audiochannelmerger-basic-expected.txt
r142848 r196130 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 4 5 PASS Exceptionwas thrown for numberOfInputs <= 0.6 PASS Exception was thrown for numberOfInputs >=32.5 PASS IndexSizeError was thrown for numberOfInputs <= 0. 6 PASS IndexSizeError was thrown for numberOfInputs > 32. 7 7 PASS AudioChannelMerger created successfully with numberOfInputs = 32. 8 8 PASS AudioChannelMerger created successfully with empty parameter. -
trunk/LayoutTests/webaudio/audiochannelmerger-basic.html
r155286 r196130 27 27 try { 28 28 var mergernode = context.createChannelMerger(0); 29 testFailed(" Exceptionshould be thrown for numberOfInputs <= 0.");29 testFailed("IndexSizeError should be thrown for numberOfInputs <= 0."); 30 30 } catch(e) { 31 testPassed("Exception was thrown for numberOfInputs <= 0."); 31 if (e.code === DOMException.INDEX_SIZE_ERR) 32 testPassed("IndexSizeError was thrown for numberOfInputs <= 0."); 33 else 34 testFailed("IndexSizeError should be thrown for numberOfInputs <= 0."); 32 35 } 33 36 34 37 try { 35 38 var mergernode = context.createChannelMerger(33); 36 testFailed(" Exception should be thrown for numberOfInputs >=32.");39 testFailed("IndexSizeError should be thrown for numberOfInputs > 32."); 37 40 } catch(e) { 38 testPassed("Exception was thrown for numberOfInputs >= 32."); 41 if (e.code === DOMException.INDEX_SIZE_ERR) 42 testPassed("IndexSizeError was thrown for numberOfInputs > 32."); 43 else 44 testFailed("IndexSizeError should be thrown for numberOfInputs > 32."); 39 45 } 40 46 -
trunk/LayoutTests/webaudio/audiochannelsplitter-expected.txt
r142848 r196130 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 4 5 PASS Exceptionbeen thrown for numberOfOutputs <= 0.6 PASS Exception been thrown for numberOfOutputs >=32.5 PASS IndexSizeError been thrown for numberOfOutputs <= 0. 6 PASS IndexSizeError been thrown for numberOfOutputs > 32. 7 7 PASS AudioChannelSplitter created successfully with numberOfOutputs = 32. 8 8 PASS AudioChannelSplitter has 32 outputs when it is created with numberOfOutputs = 32. -
trunk/LayoutTests/webaudio/audiochannelsplitter.html
r155286 r196130 86 86 try { 87 87 var splitternode = context.createChannelSplitter(0); 88 testFailed(" Exceptionshould be thrown for numberOfOutputs <= 0.");88 testFailed("IndexSizeError should be thrown for numberOfOutputs <= 0."); 89 89 } catch(e) { 90 testPassed("Exception been thrown for numberOfOutputs <= 0."); 90 if (e.code === DOMException.INDEX_SIZE_ERR) 91 testPassed("IndexSizeError been thrown for numberOfOutputs <= 0."); 92 else 93 testFailed("IndexSizeError should be thrown for numberOfOutputs <= 0."); 91 94 } 92 95 93 96 try { 94 97 var splitternode = context.createChannelSplitter(33); 95 testFailed(" Exception should be thrown for numerOfOutputs >=32.");98 testFailed("IndexSizeError should be thrown for numerOfOutputs > 32."); 96 99 } catch(e) { 97 testPassed("Exception been thrown for numberOfOutputs >= 32."); 100 if (e.code === DOMException.INDEX_SIZE_ERR) 101 testPassed("IndexSizeError been thrown for numberOfOutputs > 32."); 102 else 103 testFailed("IndexSizeError should be thrown for numerOfOutputs > 32."); 98 104 } 99 105 -
trunk/Source/WebCore/ChangeLog
r196128 r196130 1 2016-02-04 Hyemi Shin <hyemi.sin@samsung.com> 2 3 Specify an exception for createChannelMerger, createChannelSplitter and createPeriodicWave 4 https://bugs.webkit.org/show_bug.cgi?id=150925 5 6 Reviewed by Darin Adler. 7 8 createChannelMerger and createChannelSplitter should throw INDEX_SIZE_ERR 9 for invalid numberOfInputs value. 10 createPeriodicWave should throw INDEX_SIZE_ERR for invalid lengths of parameters. 11 12 Tests: webaudio/audiochannelmerger-basic.html 13 webaudio/audiochannelsplitter.html 14 webaudio/periodicwave-lengths.html 15 16 * Modules/webaudio/AudioContext.cpp: 17 (WebCore::AudioContext::createChannelSplitter): 18 (WebCore::AudioContext::createChannelMerger): 19 (WebCore::AudioContext::createPeriodicWave): 20 1 21 2016-02-04 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 22 -
trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp
r194496 r196130 609 609 610 610 if (!node.get()) { 611 ec = SYNTAX_ERR;611 ec = INDEX_SIZE_ERR; 612 612 return nullptr; 613 613 } … … 630 630 631 631 if (!node.get()) { 632 ec = SYNTAX_ERR;632 ec = INDEX_SIZE_ERR; 633 633 return nullptr; 634 634 } … … 656 656 657 657 if (!real || !imag || (real->length() != imag->length() || (real->length() > MaxPeriodicWaveLength) || (real->length() <= 0))) { 658 ec = SYNTAX_ERR;658 ec = INDEX_SIZE_ERR; 659 659 return nullptr; 660 660 }
Note: See TracChangeset
for help on using the changeset viewer.