Oscillator node should throw exception if type is assigned an invalid value
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Aug 2012 22:16:37 +0000 (22:16 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Aug 2012 22:16:37 +0000 (22:16 +0000)
commitc61c931e84db01d5bd87eea9c592b2006e04d1ed
treef0d2092cff2836dc73793e4fade13b7e524a2ee7
parenta28c3f0781ab496ccd69a55c10e4d2ca23789fe6
Oscillator node should throw exception if type is assigned an invalid value
https://bugs.webkit.org/show_bug.cgi?id=93490

Patch by Raymond Toy <rtoy@google.com> on 2012-08-13
Reviewed by Chris Rogers.

Source/WebCore:

New tests added to oscillator-basic to catch exceptions.

* Modules/webaudio/Oscillator.cpp:
(WebCore::Oscillator::Oscillator):
(WebCore::Oscillator::setType): Return exception
* Modules/webaudio/Oscillator.h:
(Oscillator): Update setType declaration
* Modules/webaudio/Oscillator.idl: setType can raise exception.

LayoutTests:

Add tests for invalid oscillator types.

* webaudio/oscillator-basic-expected.txt: Updated
* webaudio/oscillator-basic.html: Test CUSTOM and invalid
oscillator type.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webaudio/oscillator-basic-expected.txt
LayoutTests/webaudio/oscillator-basic.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/Oscillator.cpp
Source/WebCore/Modules/webaudio/Oscillator.h
Source/WebCore/Modules/webaudio/Oscillator.idl