haikuwebkit/LayoutTests/webaudio/ScriptProcessor
Chris Dumez fb70fe89a9 Fix type of exceptions thrown in the WebAudio API
https://bugs.webkit.org/show_bug.cgi?id=227959

Reviewed by Yusuke Suzuki.

LayoutTests/imported/w3c:

Resync WebAudio WPT tests from upstream 04ab41dced1f354873cab0 to gain test coverage and
rebaseline those tests.

* web-platform-tests/webaudio/resources/audit.js:
(Should.prototype.throw):
* web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/ctor-analyser-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html:
* web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-connect-method-chaining-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audionode-interface/different-contexts-expected.txt: Added.
* web-platform-tests/webaudio/the-audio-api/the-audionode-interface/different-contexts.html: Added.
* web-platform-tests/webaudio/the-audio-api/the-audionode-interface/w3c-import.log:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-dynamic.https-expected.txt: Added.
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-dynamic.https.html: Added.
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/dynamic-register-processor.js: Added.
(ProcessorA.prototype.process):
(ProcessorA):
(ProcessorB):
(ProcessorB.prototype.process):
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/w3c-import.log:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/w3c-import.log:
* web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-basic-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/ctor-biquadfilter-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter.html:
* web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/ctor-delay-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-gainnode-interface/ctor-gain-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-mediastreamaudiodestinationnode-interface/ctor-mediastreamaudiodestination-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/ctor-waveshaper-expected.txt:

Source/WebCore:

The upstream webaudio web-platform-tests were updated to validate the types of
exceptions thrown by various WebAudio APIs. It became obvious that our implementation
was not always throwing the right exception type and didn't match other browsers.

This patch updates our WebAudio implementation to keep the WebAudio WPT tests passing
now that they properly validate exception types.

No new tests, re-sync'd and rebaselined existing WPT webaudio tests.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::create):
* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::connect):
(WebCore::AudioNode::setChannelCount):
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::createScriptProcessor):
* Modules/webaudio/BiquadFilterNode.cpp:
(WebCore::BiquadFilterNode::getFrequencyResponse):
* Modules/webaudio/ChannelSplitterNode.cpp:
(WebCore::ChannelSplitterNode::setChannelCount):
* Modules/webaudio/OfflineAudioContext.cpp:
(WebCore::OfflineAudioContext::create):
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::setChannelCount):

LayoutTests:

Resync audit.js from upstream WPT and rebaseline webaudio tests.

* webaudio/OfflineAudioContext/offlineaudiocontext-constructor-expected.txt:
* webaudio/dom-exceptions-expected.txt:
* webaudio/resources/audit.js:
(Should.prototype.throw):


Canonical link: https://commits.webkit.org/239666@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-14 20:39:39 +00:00
..
scriptprocessor-offlineaudiocontext-expected.txt imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner-connections.html fails on some platforms 2020-11-04 16:09:57 +00:00
scriptprocessor-offlineaudiocontext.html
scriptprocessornode-0-output-channels-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
scriptprocessornode-0-output-channels.html
scriptprocessornode-downmix8-2channel-input-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
scriptprocessornode-downmix8-2channel-input.html
scriptprocessornode-expected.txt Fix type of exceptions thrown in the WebAudio API 2021-07-14 20:39:39 +00:00
scriptprocessornode-upmix2-8channel-input-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
scriptprocessornode-upmix2-8channel-input.html
scriptprocessornode-zero-input-channels-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
scriptprocessornode-zero-input-channels.html
scriptprocessornode.html