blob: 9d7cf8b11965a4efd93c495101fa5421f5d79719 [file] [log] [blame]
This is a testharness.js-based test.
FAIL Add ICE candidate before setting remote description should reject with InvalidStateError assert_throws: function "function() { throw e }" threw object "OperationError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': Error processing ICE candidate" that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
FAIL addIceCandidate({"candidate":"","sdpMid":null,"sdpMLineIndex":null}) should work, and add a=end-of-candidates to both m-sections promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': 1 argument required, but only 0 present."
FAIL addIceCandidate(undefined) should work, and add a=end-of-candidates to both m-sections promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': 1 argument required, but only 0 present."
FAIL addIceCandidate(null) should work, and add a=end-of-candidates to both m-sections promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': 1 argument required, but only 0 present."
FAIL addIceCandidate({}) should work, and add a=end-of-candidates to both m-sections promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': 1 argument required, but only 0 present."
FAIL addIceCandidate({usernameFragment: usernameFragment1}) should work, and add a=end-of-candidates to the first m-section promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': Candidate missing values for both sdpMid and sdpMLineIndex"
FAIL addIceCandidate({usernameFragment: usernameFragment2}) should work, and add a=end-of-candidates to the first m-section promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': Candidate missing values for both sdpMid and sdpMLineIndex"
FAIL addIceCandidate({usernameFragment: "no such ufrag"}) should work, but not add a=end-of-candidates promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': Candidate missing values for both sdpMid and sdpMLineIndex"
PASS Add ICE candidate after setting remote description should succeed
PASS Add ICE candidate with RTCIceCandidate should succeed
PASS Add candidate with only valid sdpMid should succeed
PASS Add candidate with only valid sdpMLineIndex should succeed
PASS addIceCandidate with first sdpMid and sdpMLineIndex add candidate to first media stream
PASS addIceCandidate with second sdpMid and sdpMLineIndex should add candidate to second media stream
PASS Add candidate for first media stream with null usernameFragment should add candidate to first media stream
PASS Adding multiple candidates should add candidates to their corresponding media stream
FAIL Add with empty candidate string (end of candidate) should succeed promise_test: Unhandled rejection with value: object "OperationError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': Error processing ICE candidate"
PASS Add candidate with both sdpMid and sdpMLineIndex manually set to null should reject with TypeError
PASS Add candidate with only valid candidate string should reject with TypeError
PASS Add candidate with invalid candidate string and both sdpMid and sdpMLineIndex null should reject with TypeError
PASS Add candidate with invalid sdpMid should reject with OperationError
PASS Add candidate with invalid sdpMLineIndex should reject with OperationError
FAIL Invalid sdpMLineIndex should be ignored if valid sdpMid is provided promise_test: Unhandled rejection with value: object "OperationError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': Error processing ICE candidate"
PASS Add candidate for media stream 2 with null usernameFragment should succeed
FAIL Add candidate with invalid usernameFragment should reject with OperationError assert_unreached: Should have rejected: undefined Reached unreachable code
PASS Add candidate with invalid candidate string should reject with OperationError
FAIL Add candidate with sdpMid belonging to different usernameFragment should reject with OperationError assert_unreached: Should have rejected: undefined Reached unreachable code
Harness: the test ran to completion.