Changeset 267376 in webkit
- Timestamp:
- Sep 21, 2020, 3:50:47 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-connect-method-chaining-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-expected.txt (modified) (1 diff)
-
LayoutTests/webaudio/MediaElementAudioSource/mediaelementaudiosourcenode-expected.txt (modified) (1 diff)
-
LayoutTests/webaudio/ScriptProcessor/scriptprocessornode-0-output-channels-expected.txt (modified) (1 diff)
-
LayoutTests/webaudio/dom-exceptions-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/webaudio/AudioNode.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r267369 r267376 1 2020-09-21 Chris Dumez <cdumez@apple.com> 2 3 Throw when AudioConnect::connect() is called for an output that has no channels 4 https://bugs.webkit.org/show_bug.cgi?id=216802 5 6 Reviewed by Darin Adler. 7 8 * webaudio/MediaElementAudioSource/mediaelementaudiosourcenode-expected.txt: 9 * webaudio/dom-exceptions-expected.txt: 10 Rebaseline existing tests because I improved exception messages. 11 12 * webaudio/ScriptProcessor/scriptprocessornode-0-output-channels-expected.txt: 13 Rebaseline test that is now passing. 14 1 15 2020-09-21 Jiewen Tan <jiewen_tan@apple.com> 2 16 -
trunk/LayoutTests/imported/w3c/ChangeLog
r267357 r267376 1 2020-09-21 Chris Dumez <cdumez@apple.com> 2 3 Throw when AudioConnect::connect() is called for an output that has no channels 4 https://bugs.webkit.org/show_bug.cgi?id=216802 5 6 Reviewed by Darin Adler. 7 8 Rebaseline existing tests because I improved exception messages. 9 10 * web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-connect-method-chaining-expected.txt: 11 * web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-expected.txt: 12 1 13 2020-09-21 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-connect-method-chaining-expected.txt
r265962 r267376 59 59 PASS < [media-group] All assertions passed. (total 6 assertions) 60 60 PASS > [invalid-operation] 61 PASS Connecting with an invalid output threw IndexSizeError: " The index is not in the allowed range.".62 PASS Connecting to a node from the different context threw SyntaxError: " The string did not match the expected pattern.".61 PASS Connecting with an invalid output threw IndexSizeError: "Output index exceeds number of outputs". 62 PASS Connecting to a node from the different context threw SyntaxError: "Source and destination nodes belong to different audio contexts". 63 63 PASS < [invalid-operation] All assertions passed. (total 2 assertions) 64 64 PASS > [verification] -
trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-expected.txt
r264342 r267376 10 10 PASS audioNode.connect(0, 0, 0) threw TypeError: "Argument 1 ('destination') to AudioNode.connect must be an instance of AudioNode". 11 11 PASS audioNode.connect(null, 0, 0) threw TypeError: "Argument 1 ('destination') to AudioNode.connect must be an instance of AudioNode". 12 PASS audioNode.connect(context.destination, 5, 0) threw IndexSizeError: " The index is not in the allowed range.".13 PASS audioNode.connect(context.destination, 0, 5) threw IndexSizeError: " The index is not in the allowed range.".12 PASS audioNode.connect(context.destination, 5, 0) threw IndexSizeError: "Output index exceeds number of outputs". 13 PASS audioNode.connect(context.destination, 0, 5) threw IndexSizeError: "Input index exceeds number of inputs". 14 14 PASS audioNode.connect(context.destination, 0, 0) did not throw an exception. 15 PASS Connecting a node to a different context threw SyntaxError: " The string did not match the expected pattern.".15 PASS Connecting a node to a different context threw SyntaxError: "Source and destination nodes belong to different audio contexts". 16 16 PASS context3 = new AudioContext(1, 44100, 44100) threw TypeError: "Type error". 17 17 PASS AudioNode is an EventTarget is true. -
trunk/LayoutTests/webaudio/MediaElementAudioSource/mediaelementaudiosourcenode-expected.txt
r267307 r267376 7 7 PASS audioNode.numberOfOutputs is equal to 1. 8 8 PASS audioNode.connect(0, 0, 0) threw TypeError: "Argument 1 ('destination') to AudioNode.connect must be an instance of AudioNode". 9 PASS audioNode.connect(context.destination, 5, 0) threw IndexSizeError: " The index is not in the allowed range.".10 PASS audioNode.connect(context.destination, 0, 5) threw IndexSizeError: " The index is not in the allowed range.".9 PASS audioNode.connect(context.destination, 5, 0) threw IndexSizeError: "Output index exceeds number of outputs". 10 PASS audioNode.connect(context.destination, 0, 5) threw IndexSizeError: "Input index exceeds number of inputs". 11 11 PASS mediaSource.mediaElement instanceof HTMLMediaElement is true. 12 12 PASS mediaSource.mediaElement is same object is true. -
trunk/LayoutTests/webaudio/ScriptProcessor/scriptprocessornode-0-output-channels-expected.txt
r267307 r267376 11 11 PASS < [initialize] All assertions passed. (total 4 assertions) 12 12 PASS > [test] 13 FAIL X scriptNode1.connect(analyzer) did not throw an exception. assert_true: expected true got false 13 PASS scriptNode1.connect(analyzer) threw InvalidAccessError: "Node has zero output channels". 14 14 PASS scriptNode2.connect(analyzer) did not throw an exception. 15 FAIL < [test] 1 out of 2 assertions were failed. assert_true: expected true got false 16 FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 2 tasks were failed. assert_true: expected true got false 15 PASS < [test] All assertions passed. (total 2 assertions) 16 PASS # AUDIT TASK RUNNER FINISHED: 2 tasks ran successfully. 17 17 -
trunk/LayoutTests/webaudio/dom-exceptions-expected.txt
r267151 r267376 104 104 PASS > [connections] AudioNode connections 105 105 PASS node.connect(null, 0, 0) threw TypeError: "Argument 1 ('destination') to AudioNode.connect must be an instance of AudioNode". 106 PASS node.connect(context.destination, 100, 0) threw IndexSizeError: " The index is not in the allowed range.".107 PASS node.connect(context.destination, 0, 100) threw IndexSizeError: " The index is not in the allowed range.".108 PASS node.connect(node2.gain, 100) threw IndexSizeError: " The index is not in the allowed range.".106 PASS node.connect(context.destination, 100, 0) threw IndexSizeError: "Output index exceeds number of outputs". 107 PASS node.connect(context.destination, 0, 100) threw IndexSizeError: "Input index exceeds number of inputs". 108 PASS node.connect(node2.gain, 100) threw IndexSizeError: "Output index exceeds number of outputs". 109 109 PASS node.disconnect(99) threw IndexSizeError: "output index is out of bounds". 110 PASS node.connect(otherContext.destination) threw SyntaxError: " The string did not match the expected pattern.".110 PASS node.connect(otherContext.destination) threw SyntaxError: "Source and destination nodes belong to different audio contexts". 111 111 PASS < [connections] All assertions passed. (total 6 assertions) 112 112 PASS > [channel-stuff] channelCount, channelCountMode, channelInterpretation -
trunk/Source/WebCore/ChangeLog
r267373 r267376 1 2020-09-21 Chris Dumez <cdumez@apple.com> 2 3 Throw when AudioConnect::connect() is called for an output that has no channels 4 https://bugs.webkit.org/show_bug.cgi?id=216802 5 6 Reviewed by Darin Adler. 7 8 Throw when AudioConnect::connect() is called for an output that has no channels, for consistency 9 with Blink. The ScriptProcessorNode cannot have an output node that has zero channels. 10 11 No new tests, rebaselined existing tests. 12 13 * Modules/webaudio/AudioNode.cpp: 14 (WebCore::AudioNode::connect): 15 1 16 2020-09-21 Yusuke Suzuki <ysuzuki@apple.com> 2 17 -
trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp
r266559 r267376 196 196 // Sanity check input and output indices. 197 197 if (outputIndex >= numberOfOutputs()) 198 return Exception { IndexSizeError };198 return Exception { IndexSizeError, "Output index exceeds number of outputs"_s }; 199 199 200 200 if (inputIndex >= destination.numberOfInputs()) 201 return Exception { IndexSizeError };201 return Exception { IndexSizeError, "Input index exceeds number of inputs"_s }; 202 202 203 203 if (&context() != &destination.context()) 204 return Exception { SyntaxError };204 return Exception { SyntaxError, "Source and destination nodes belong to different audio contexts"_s }; 205 205 206 206 auto* input = destination.input(inputIndex); 207 207 auto* output = this->output(outputIndex); 208 209 if (!output->numberOfChannels()) 210 return Exception { InvalidAccessError, "Node has zero output channels"_s }; 211 208 212 input->connect(output); 209 213 … … 225 229 226 230 if (outputIndex >= numberOfOutputs()) 227 return Exception { IndexSizeError };231 return Exception { IndexSizeError, "Output index exceeds number of outputs"_s }; 228 232 229 233 if (&context() != ¶m.context()) 230 return Exception { SyntaxError };234 return Exception { SyntaxError, "Node and AudioParam belong to different audio contexts"_s }; 231 235 232 236 auto* output = this->output(outputIndex);
Note:
See TracChangeset
for help on using the changeset viewer.