-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://bugs.webkit.org/show_bug.cgi?id=260790 rdar://114559008 Reviewed by Youenn Fablet. Aligns RTCDataChannel with its specification (and WebSocket). Also address some nits in our WebSocket setBinaryType() implementation. This largely matches Gecko. (Chromium does not appear to implement this.) Gecko and the specification still have a different default value. Updated tests are upstreamed via web-platform-tests/wpt#41663. * LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDataChannel-binaryType.window-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDataChannel-binaryType.window.js: (test): (const.binaryType.of.invalidBinaryTypes.test): * Source/WebCore/Modules/mediastream/RTCDataChannel.cpp: (WebCore::RTCDataChannel::setBinaryType): (WebCore::RTCDataChannel::didReceiveRawData): (WebCore::blobKeyword): Deleted. (WebCore::arraybufferKeyword): Deleted. (WebCore::RTCDataChannel::binaryType const): Deleted. * Source/WebCore/Modules/mediastream/RTCDataChannel.h: * Source/WebCore/Modules/mediastream/RTCDataChannel.idl: * Source/WebCore/Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::setBinaryType): * Source/WebCore/Modules/websockets/WebSocket.h: Canonical link: https://commits.webkit.org/267353@main
- Loading branch information
Showing
7 changed files
with
33 additions
and
54 deletions.
There are no files selected for viewing
13 changes: 8 additions & 5 deletions
13
...ests/imported/w3c/web-platform-tests/webrtc/RTCDataChannel-binaryType.window-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
|
||
FAIL Default binaryType value assert_equals: dc.binaryType should be 'blob' expected "blob" but got "arraybuffer" | ||
PASS Setting binaryType to 'blob' should succeed | ||
PASS Setting binaryType to 'arraybuffer' should succeed | ||
PASS Setting invalid binaryType 'jellyfish' should throw SyntaxError | ||
PASS Setting invalid binaryType 'arraybuffer ' should throw SyntaxError | ||
PASS Setting invalid binaryType '' should throw SyntaxError | ||
PASS Setting invalid binaryType 'null' should throw SyntaxError | ||
PASS Setting invalid binaryType 'undefined' should throw SyntaxError | ||
PASS Setting binaryType to 'jellyfish' should be ignored | ||
PASS Setting binaryType to 'arraybuffer ' should be ignored | ||
PASS Setting binaryType to '' should be ignored | ||
PASS Setting binaryType to 'null' should be ignored | ||
PASS Setting binaryType to 'undefined' should be ignored | ||
PASS Setting binaryType to '234' should be ignored | ||
PASS Setting binaryType to '54' should be ignored | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters