blob: b16171728b50562b0ec052411f253e74233245f1 [file] [log] [blame]
PASS new RTCPeerConnection() should have default configuration.iceServers of undefined
PASS new RTCPeerConnection(config) - {} should succeed
PASS setConfiguration(config) - {} should succeed
PASS new RTCPeerConnection(config) - { iceServers: null } should throw TypeError
PASS setConfiguration(config) - { iceServers: null } should throw TypeError
PASS new RTCPeerConnection(config) - { iceServers: undefined } should succeed
PASS setConfiguration(config) - { iceServers: undefined } should succeed
PASS new RTCPeerConnection(config) - { iceServers: [] } should succeed
PASS setConfiguration(config) - { iceServers: [] } should succeed
PASS new RTCPeerConnection(config) - { iceServers: [null] } should throw TypeError
PASS setConfiguration(config) - { iceServers: [null] } should throw TypeError
PASS new RTCPeerConnection(config) - { iceServers: [undefined] } should throw TypeError
PASS setConfiguration(config) - { iceServers: [undefined] } should throw TypeError
PASS new RTCPeerConnection(config) - { iceServers: [{}] } should throw TypeError
PASS setConfiguration(config) - { iceServers: [{}] } should throw TypeError
FAIL new RTCPeerConnection(config) - with stun server should succeed assert_equals: expected (string) "password" but got (undefined) undefined
FAIL setConfiguration(config) - with stun server should succeed assert_equals: expected (string) "password" but got (undefined) undefined
FAIL new RTCPeerConnection(config) - with stun server array should succeed assert_equals: expected (string) "password" but got (undefined) undefined
FAIL setConfiguration(config) - with stun server array should succeed assert_equals: expected (string) "password" but got (undefined) undefined
FAIL new RTCPeerConnection(config) - with 2 stun servers should succeed assert_equals: expected (string) "password" but got (undefined) undefined
FAIL setConfiguration(config) - with 2 stun servers should succeed assert_equals: expected (string) "password" but got (undefined) undefined
FAIL new RTCPeerConnection(config) - with turn server, username, credential should succeed assert_equals: expected (string) "password" but got (undefined) undefined
FAIL setConfiguration(config) - with turn server, username, credential should succeed assert_equals: expected (string) "password" but got (undefined) undefined
FAIL new RTCPeerConnection(config) - with turns server and empty string username, credential should succeed Bad Configuration Parameters
FAIL setConfiguration(config) - with turns server and empty string username, credential should succeed Bad Configuration Parameters
FAIL new RTCPeerConnection(config) - with turn server and empty string username, credential should succeed Bad Configuration Parameters
FAIL setConfiguration(config) - with turn server and empty string username, credential should succeed Bad Configuration Parameters
PASS new RTCPeerConnection(config) - with one turns server, one turn server, username, credential should succeed
PASS setConfiguration(config) - with one turns server, one turn server, username, credential should succeed
FAIL new RTCPeerConnection(config) - with stun server and credentialType password should succeed assert_equals: expected (string) "password" but got (undefined) undefined
FAIL setConfiguration(config) - with stun server and credentialType password should succeed assert_equals: expected (string) "password" but got (undefined) undefined
PASS new RTCPeerConnection(config) - with turn server and no credentials should throw InvalidAccessError
PASS setConfiguration(config) - with turn server and no credentials should throw InvalidAccessError
PASS new RTCPeerConnection(config) - with turn server and only username should throw InvalidAccessError
PASS setConfiguration(config) - with turn server and only username should throw InvalidAccessError
PASS new RTCPeerConnection(config) - with turn server and only credential should throw InvalidAccessError
PASS setConfiguration(config) - with turn server and only credential should throw InvalidAccessError
PASS new RTCPeerConnection(config) - with turns server and no credentials should throw InvalidAccessError
PASS setConfiguration(config) - with turns server and no credentials should throw InvalidAccessError
PASS new RTCPeerConnection(config) - with turns server and only username should throw InvalidAccessError
PASS setConfiguration(config) - with turns server and only username should throw InvalidAccessError
PASS new RTCPeerConnection(config) - with turns server and only credential should throw InvalidAccessError
PASS setConfiguration(config) - with turns server and only credential should throw InvalidAccessError
FAIL new RTCPeerConnection(config) - with "" url should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: ''
}] })" threw object "NotSupportedError: ICE server protocol not supported" that is not a DOMException SyntaxError: property "code" is equal to 9, expected 12
FAIL setConfiguration(config) - with "" url should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: ''
}] })" threw object "NotSupportedError: ICE server protocol not supported" that is not a DOMException SyntaxError: property "code" is equal to 9, expected 12
FAIL new RTCPeerConnection(config) - with ["stun:stun1.example.net", ""] url should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: ['stun:stun1.example.net', '']
}] })" threw object "NotSupportedError: ICE server protocol not supported" that is not a DOMException SyntaxError: property "code" is equal to 9, expected 12
FAIL setConfiguration(config) - with ["stun:stun1.example.net", ""] url should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: ['stun:stun1.example.net', '']
}] })" threw object "NotSupportedError: ICE server protocol not supported" that is not a DOMException SyntaxError: property "code" is equal to 9, expected 12
FAIL new RTCPeerConnection(config) - with relative url should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: 'relative-url'
}] })" threw object "NotSupportedError: ICE server protocol not supported" that is not a DOMException SyntaxError: property "code" is equal to 9, expected 12
FAIL setConfiguration(config) - with relative url should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: 'relative-url'
}] })" threw object "NotSupportedError: ICE server protocol not supported" that is not a DOMException SyntaxError: property "code" is equal to 9, expected 12
FAIL new RTCPeerConnection(config) - with http url should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: 'http://example.com'
}] })" threw object "NotSupportedError: ICE server protocol not supported" that is not a DOMException SyntaxError: property "code" is equal to 9, expected 12
FAIL setConfiguration(config) - with http url should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: 'http://example.com'
}] })" threw object "NotSupportedError: ICE server protocol not supported" that is not a DOMException SyntaxError: property "code" is equal to 9, expected 12
FAIL new RTCPeerConnection(config) - with invalid turn url should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: 'turn://example.org/foo?x=y'
}] })" threw object "InvalidAccessError: TURN/TURNS server requires both username and credential" that is not a DOMException SyntaxError: property "code" is equal to 15, expected 12
FAIL setConfiguration(config) - with invalid turn url should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: 'turn://example.org/foo?x=y'
}] })" threw object "InvalidAccessError: TURN/TURNS server requires both username and credential" that is not a DOMException SyntaxError: property "code" is equal to 15, expected 12
FAIL new RTCPeerConnection(config) - with invalid stun url should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: 'stun://example.org/foo?x=y'
}] })" threw object "InvalidAccessError: Bad Configuration Parameters" that is not a DOMException SyntaxError: property "code" is equal to 15, expected 12
FAIL setConfiguration(config) - with invalid stun url should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: 'stun://example.org/foo?x=y'
}] })" threw object "InvalidAccessError: Bad Configuration Parameters" that is not a DOMException SyntaxError: property "code" is equal to 15, expected 12
FAIL new RTCPeerConnection(config) - with empty urls should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: []
}] })" did not throw
FAIL setConfiguration(config) - with empty urls should throw SyntaxError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: []
}] })" did not throw
FAIL new RTCPeerConnection(config) - with invalid credentialType should throw TypeError assert_throws_js: function "() =>
makePc({ iceServers: [{
urls: [],
credentialType: 'invalid'
}] })" did not throw
FAIL setConfiguration(config) - with invalid credentialType should throw TypeError assert_throws_js: function "() =>
makePc({ iceServers: [{
urls: [],
credentialType: 'invalid'
}] })" did not throw
FAIL new RTCPeerConnection(config) - with credentialType token should throw TypeError assert_throws_js: function "() =>
makePc({ iceServers: [{
urls: [],
credentialType: 'token'
}] })" did not throw
FAIL setConfiguration(config) - with credentialType token should throw TypeError assert_throws_js: function "() =>
makePc({ iceServers: [{
urls: [],
credentialType: 'token'
}] })" did not throw
PASS new RTCPeerConnection(config) - with url field should throw TypeError
PASS setConfiguration(config) - with url field should throw TypeError
FAIL new RTCPeerConnection(config) - with turns server, credentialType password, and object credential should throw InvalidAccessError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: 'turns:turn.example.org',
credentialType: 'password',
username: 'user',
credential: {
macKey: '',
accessToken: ''
}
}] })" did not throw
FAIL setConfiguration(config) - with turns server, credentialType password, and object credential should throw InvalidAccessError assert_throws_dom: function "() =>
makePc({ iceServers: [{
urls: 'turns:turn.example.org',
credentialType: 'password',
username: 'user',
credential: {
macKey: '',
accessToken: ''
}
}] })" did not throw