blob: ef18d824dc16225e4f5235ab3fc2253460589948 [file] [log] [blame]
This is a testharness.js-based test.
PASS createDataChannel with no argument should throw TypeError
PASS createDataChannel with closed connection should throw InvalidStateError
FAIL createDataChannel attribute default values assert_equals: expected (object) null but got (undefined) undefined
FAIL createDataChannel with provided parameters should initialize attributes to provided values Failed to execute 'createDataChannel' on 'RTCPeerConnection': RTCDataChannel is not supported
PASS createDataChannel with label "foo" should succeed
PASS createDataChannel with label null should succeed
PASS createDataChannel with label undefined should succeed
PASS createDataChannel with label lone surrogate should succeed
PASS createDataChannel with ordered false should succeed
PASS createDataChannel with ordered null/undefined should succeed
FAIL createDataChannel with maxPacketLifeTime 0 should succeed assert_equals: expected (number) 0 but got (undefined) undefined
PASS createDataChannel with maxRetransmits 0 should succeed
FAIL createDataChannel with both maxPacketLifeTime and maxRetransmits should throw SyntaxError assert_throws: function "() => pc.createDataChannel('', {
maxPacketLifeTime: 0,
maxRetransmits: 0
})" threw object "NotSupportedError: Failed to execute 'createDataChannel' on 'RTCPeerConnection': RTCDataChannel is not supported" ("NotSupportedError") expected object "TypeError" ("TypeError")
PASS createDataChannel with protocol "foo" should succeed
PASS createDataChannel with protocol null should succeed
PASS createDataChannel with protocol undefined should succeed
PASS createDataChannel with protocol lone surrogate should succeed
PASS createDataChannel with negotiated true should succeed
PASS createDataChannel with id 0 should succeed
PASS createDataChannel with id 1 should succeed
FAIL createDataChannel with id 65534 should succeed Failed to execute 'createDataChannel' on 'RTCPeerConnection': RTCDataChannel is not supported
PASS createDataChannel with id -1 should throw TypeError
FAIL createDataChannel with id 65535 should throw TypeError assert_throws: function "() => pc.createDataChannel('', { id })" threw object "NotSupportedError: Failed to execute 'createDataChannel' on 'RTCPeerConnection': RTCDataChannel is not supported" ("NotSupportedError") expected object "TypeError" ("TypeError")
PASS createDataChannel with id 65536 should throw TypeError
FAIL createDataChannel with priority "high" should succeed assert_equals: expected (string) "high" but got (undefined) undefined
FAIL createDataChannel with invalid priority should throw TypeError assert_throws: function "() => pc.createDataChannel('', { priority: 'invalid' })" did not throw
FAIL createDataChannel with negotiated false and long label should throw TypeError assert_throws: function "() =>
pc.createDataChannel('', {
label: ' '.repeat(65536),
negotiated: false
})" did not throw
FAIL createDataChannel with negotiated false and long protocol should throw TypeError assert_throws: function "() =>
pc.createDataChannel('', {
protocol: ' '.repeat(65536),
negotiated: false
})" did not throw
FAIL createDataChannel with negotiated true and long label and long protocol should succeed assert_equals: expected " " but got ""
FAIL Channels created after SCTP transport is established should have id assigned assert_equals: Expect initial id to be null expected (object) null but got (number) 65535
Harness: the test ran to completion.