Changeset 106579 in webkit
- Timestamp:
- Feb 2, 2012 12:29:20 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r106578 r106579 1 2012-02-02 Raymond Toy <rtoy@google.com> 2 3 Illegal panner model values should throw an exception 4 https://bugs.webkit.org/show_bug.cgi?id=77235 5 6 Reviewed by Kenneth Russell. 7 8 * webaudio/panner-set-model-expected.txt: Updated. 9 * webaudio/panner-set-model.html: Catch the errors that are thrown 10 for invalid panning model values. 11 * platform/chromium/test_expectations.txt: Remove test that no 12 longer crashes. 13 1 14 2012-02-02 Nate Chapin <japhet@chromium.org> 2 15 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r106578 r106579 3820 3820 BUGCR110365 WIN : webaudio/gain.html = PASS AUDIO 3821 3821 3822 BUGWK77283 DEBUG : webaudio/panner-set-model.html = CRASH3823 3824 3822 BUGWK76488 : css3/images/cross-fade-background-size.html = IMAGE IMAGE+TEXT 3825 3823 -
trunk/LayoutTests/webaudio/panner-set-model-expected.txt
r106174 r106579 5 5 PASS Panner set to EQUALPOWER model and read correctly. 6 6 PASS Panner set to HRTF model and read correctly. 7 PASS Panner set to SOUNDFIELD model and read correctly.8 PASS Panner set to invalid model and panningModel did not change.7 PASS Setting panner model to SOUNDFIELD correctly throws exception because it is not implemented. 8 PASS Illegal panner model correctly throws exception. 9 9 PASS Panning model tests passed. 10 10 PASS successfullyParsed is true -
trunk/LayoutTests/webaudio/panner-set-model.html
r106174 r106579 45 45 success = false; 46 46 } 47 48 panner.panningModel = panner.SOUNDFIELD;49 if (panner.panningModel == 2) {50 testPassed("Panner set to SOUNDFIELD model and read correctly.");51 } else {52 testFailed(" Panner model set to SOUNDFIELD (2) but returned " + panner.panningModel);47 48 // SOUNDFIELD should throw exception because it is not 49 // currently implemented. (See https://bugs.webkit.org/show_bug.cgi?id=77367) 50 try { 51 panner.panningModel = panner.SOUNDFIELD; 52 testFailed("Setting panner model to SOUNDFIELD should throw exception because it is not implemented."); 53 53 success = false; 54 } catch(e) { 55 testPassed("Setting panner model to SOUNDFIELD correctly throws exception because it is not implemented."); 54 56 } 55 57 56 // Set to invalid value and make sure it didn't change from 57 // it's previous setting (of 2). 58 panner.panningModel = 99; 59 if (panner.panningModel == 2) { 60 testPassed("Panner set to invalid model and panningModel did not change."); 61 } else { 62 testFailed("Panner set to invalid model, but the panningModel changed from 2 to " + panner.panningModel); 58 // Other invalid models should throw an exception. 59 try { 60 panner.panningModel = 99; 61 testFailed("Illegal panner model should throw exception."); 63 62 success = false; 63 } catch(e) { 64 testPassed("Illegal panner model correctly throws exception."); 64 65 } 65 66 -
trunk/Source/WebCore/ChangeLog
r106575 r106579 1 2012-02-02 Raymond Toy <rtoy@google.com> 2 3 Illegal panner model values should throw an exception 4 https://bugs.webkit.org/show_bug.cgi?id=77235 5 6 Reviewed by Kenneth Russell. 7 8 Modified existing panner-set-model test to catch exceptions. 9 Debug build should not crash anymore. 10 11 * webaudio/AudioPannerNode.cpp: 12 (WebCore::AudioPannerNode::setPanningModel): Throw exception for 13 invalid model values. 14 * webaudio/AudioPannerNode.h: 15 (AudioPannerNode): Update declaration 16 * webaudio/AudioPannerNode.idl: Setting panner model can throw 17 exception. 18 1 19 2012-02-02 Kentaro Hara <haraken@chromium.org> 2 20 -
trunk/Source/WebCore/webaudio/AudioPannerNode.cpp
r106174 r106579 34 34 #include "AudioNodeInput.h" 35 35 #include "AudioNodeOutput.h" 36 #include "ExceptionCode.h" 36 37 #include "HRTFPanner.h" 37 38 #include <wtf/MathExtras.h> … … 151 152 } 152 153 153 void AudioPannerNode::setPanningModel(unsigned short model )154 void AudioPannerNode::setPanningModel(unsigned short model, ExceptionCode& ec) 154 155 { 155 156 switch (model) { 156 157 case EQUALPOWER: 157 158 case HRTF: 158 case SOUNDFIELD:159 159 if (!m_panner.get() || model != m_panningModel) { 160 160 OwnPtr<Panner> newPanner = Panner::create(model, sampleRate()); … … 163 163 } 164 164 break; 165 case SOUNDFIELD: 166 // FIXME: Implement sound field model. See // https://bugs.webkit.org/show_bug.cgi?id=77367. 167 // For now, fall through to throw an exception. 165 168 default: 166 // FIXME: consider throwing an exception for illegal model values.169 ec = NOT_SUPPORTED_ERR; 167 170 break; 168 171 } -
trunk/Source/WebCore/webaudio/AudioPannerNode.h
r104993 r106579 73 73 // Panning model 74 74 unsigned short panningModel() const { return m_panningModel; } 75 void setPanningModel(unsigned short );75 void setPanningModel(unsigned short, ExceptionCode&); 76 76 77 77 // Position -
trunk/Source/WebCore/webaudio/AudioPannerNode.idl
r106532 r106579 34 34 35 35 // Default model for stereo is HRTF 36 attribute unsigned long panningModel; // FIXME: use unsigned short when glue generation supports it 36 // FIXME: use unsigned short when glue generation supports it 37 attribute unsigned long panningModel 38 setter raises(DOMException); 37 39 38 40 // Uses a 3D cartesian coordinate system
Note: See TracChangeset
for help on using the changeset viewer.