AudioPannerNode should raise exception when distanceModel is set incorrectly
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2012 19:14:07 +0000 (19:14 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2012 19:14:07 +0000 (19:14 +0000)
commitc544335af8b670589308e915805b4a0aea308109
tree8d7cb74b53bb5674774749321ba63e5619c51c3e
parente3a78595ef774db3f650c42dc6197f4fe66ac81e
AudioPannerNode should raise exception when distanceModel is set incorrectly
https://bugs.webkit.org/show_bug.cgi?id=90952

Patch by Li Yin <li.yin@intel.com> on 2012-07-31
Reviewed by Chris Rogers.

Source/WebCore:

Spec: http://www.w3.org/TR/webaudio/#AudioPannerNode-section
The distance model can be only set to LINEAR_DISTANCE, INVERSE_DISTANCE or EXPONENTIAL_DISTANCE.
If the incorrect value is set, it will raise the exception.
Use the unsigned short to replace unsigned long in AudioPannerNode.idl.

Test: webaudio/audiopannernode-basic.html

* Modules/webaudio/AudioPannerNode.cpp:
(WebCore::AudioPannerNode::setDistanceModel): raise exception
(WebCore):
* Modules/webaudio/AudioPannerNode.h:
(AudioPannerNode):
* Modules/webaudio/AudioPannerNode.idl: using unsigned short to replace unsigned long

LayoutTests:

Spec: http://www.w3.org/TR/webaudio/#AudioPannerNode-section
Add tests for distanceModel,numberOfInputs and numberOfInputs of AudioPannerNode.

* webaudio/audiopannernode-basic-expected.txt: Added.
* webaudio/audiopannernode-basic.html: Added.
* webaudio/panner-set-model-expected.txt: Removed.
* webaudio/panner-set-model.html: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webaudio/audiopannernode-basic-expected.txt [new file with mode: 0644]
LayoutTests/webaudio/audiopannernode-basic.html [new file with mode: 0644]
LayoutTests/webaudio/panner-set-model-expected.txt [deleted file]
LayoutTests/webaudio/panner-set-model.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AudioPannerNode.cpp
Source/WebCore/Modules/webaudio/AudioPannerNode.h
Source/WebCore/Modules/webaudio/AudioPannerNode.idl