Backed out changeset beae0db3529d (bug 1531910) for WPT failures in webrtc/RTCPeerConnection-createDataChannel.html

This commit is contained in:
Dorel Luca 2019-05-03 18:37:07 +03:00
Родитель 1050f322ac
Коммит 926056ac66
2 изменённых файлов: 5 добавлений и 14 удалений

Просмотреть файл

@ -1641,19 +1641,6 @@ class RTCPeerConnection {
if (maxRetransmitTime !== undefined) {
this.logWarning("Use maxPacketLifeTime instead of deprecated maxRetransmitTime which will stop working soon in createDataChannel!");
}
if (protocol.length > 32767) {
// At least 65536/2 UTF-16 characters. UTF-8 might be too long.
// Spec says to check how long |protocol| and |label| are in _bytes_. This
// is a little ambiguous. For now, examine the length of the utf-8 encoding.
const byteCounter = new TextEncoder("utf-8");
if (byteCounter.encode(protocol).length > 65535) {
throw new this._win.DOMException(
"protocol cannot be longer than 65535 bytes", "TypeError");
}
}
if (!negotiated) {
id = null;
} else if (id === null) {

Просмотреть файл

@ -23,9 +23,13 @@
expected: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1531908
[createDataChannel with negotiated false and long protocol should throw TypeError]
expected: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1531910
[createDataChannel with negotiated true and long label and long protocol should succeed]
expected: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1531908
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1531908 and https://bugzilla.mozilla.org/show_bug.cgi?id=1531910
[Channels created after SCTP transport is established should have id assigned]
expected: FAIL