Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial test for RTCPeerConnection ondatachannel #6186

Merged

Conversation

soareschen
Copy link
Contributor

@soareschen soareschen commented Jun 8, 2017

This is a work in progress. (edit: done) I added one basic test for establishing data channel connection with a remote peer and fire a datachannel event.

I also make use of this to test the state change of the peer connection and RTC*Transport objects. The idea is that for the datachannel event to be fired on a remote peer, it must first establish an SCTP connection and send the data channel negotiation through a DATA_CHANNEL_OPEN message. In other words by that time the RTCDtlsTransport and RTCIceTransport should have all been in connected state.

Other than that, since the test connection only have one RTCDtlsTransport and one RTCIceTransport and we know their final state, we can also test on the peer connection state.

There is only one thing that I am not very certain. Currently running on the test on Chrome, the RTCIceConnectionState is connected instead of completed. I am not sure if under TrickleICE, a DTLS connection can be established while the ICE agent is still attempting connection with each candidate pair. The current assumption for the test is that this is allowed, and the assertion allows the final RTCIceConnectionState to be either connected or completed. Would appreciate if anyone familar with this can confirm or correct me if I am wrong.

(Edit: assumption was wrong and test is removed)

@w3c-bots
Copy link

w3c-bots commented Jun 8, 2017

View the complete job log.

Firefox (nightly)

Testing web-platform-tests at revision 9d556ec
Using browser at version BuildID 20170608100220; SourceStamp 7efda263a842e60cd0cc00b3c4a7058c65590702
Starting 10 test iterations
All results were stable

All results

6 tests ran
/webrtc/RTCPeerConnection-createAnswer.html
Subtest Results Messages
OK
createAnswer() with null remoteDescription should reject with InvalidStateError PASS
createAnswer() after setting remote description should succeed PASS
createAnswer() when connection is closed reject with InvalidStateError PASS
createAnswer() when connection is closed in parallel should never resolve PASS
/webrtc/RTCPeerConnection-createOffer.html
Subtest Results Messages
OK
createOffer() with no argument from newly created RTCPeerConnection should succeed FAIL promise_test: Unhandled rejection with value: object "InternalError: Cannot create an offer with no local tracks, no offerToReceiveAudio/Video, and no DataChannel."
createOffer() and then setLocalDescription() should succeed FAIL assert_not_equals: Expect session description to be defined, but got undefined got disallowed value undefined
createOffer() after connection is closed should reject with InvalidStateError PASS
createOffer() when connection is closed halfway should never resolve PASS
When media stream is added when createOffer() is running in parallel, the result offer should contain the new media stream FAIL pc.addTransceiver is not a function
createOffer() with offerToReceiveAudio should add audio line to all subsequent created offers FAIL promise_test: Unhandled rejection with value: object "InternalError: Cannot create an offer with no local tracks, no offerToReceiveAudio/Video, and no DataChannel."
createOffer() with offerToReceiveVideo should add video line to all subsequent created offers FAIL promise_test: Unhandled rejection with value: object "InternalError: Cannot create an offer with no local tracks, no offerToReceiveAudio/Video, and no DataChannel."
createOffer() with offerToReceiveAudio:true then offerToReceiveVideo:true should have result offer with both audio and video line FAIL assert_equals: Expect audio line to remain in created offer expected 1 but got 0
Test onsignalingstatechange event for createOffer() and then setLocalDescription() should succeed PASS
/webrtc/RTCPeerConnection-ondatachannel.html
Subtest Results Messages
OK
datachannel event should fire when new data channel is announced to the remote peer FAIL RTCDataChannel is not defined
Data channel created on remote peer should match the same configuration as local peer FAIL assert_equals: expected (number) 1 but got (undefined) undefined
Data channel created with negotiated set to true should not fire datachannel event on remote peer PASS
/webrtc/RTCPeerConnection-setLocalDescription.html
Subtest Results Messages
OK
setLocalDescription with type offer and null sdp should use lastOffer generated from createOffer FAIL promise_test: Unhandled rejection with value: object "InternalError: Cannot create an offer with no local tracks, no offerToReceiveAudio/Video, and no DataChannel."
setLocalDescription() with offer not created by own createOffer() should reject with InvalidModificationError FAIL assert_throws: function "function() { throw e }" threw object "InvalidStateError: Calling SetLocal without first calling CreateOffer/Answer is not supported." that is not a DOMException InvalidModificationError: property "code" is equal to 11, expected 13
Set created offer other than last offer should reject with InvalidModificationError FAIL assert_throws: function "function() { throw e }" threw object "InvalidSessionDescriptionError: Changing the media-type of m-sections is not allowed" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13
Creating and setting offer multiple times should succeed FAIL promise_test: Unhandled rejection with value: object "InvalidStateError: Cannot create offer in state have-local-offer"
setLocalDescription(offer) should never resolve if connection is closed in parallel FAIL assert_unreached: Pending promise should never be resolved. Instead it is rejected with: InternalError: Cannot create an offer with no local tracks, no offerToReceiveAudio/Video, and no DataChannel. Reached unreachable code
setLocalDescription() with valid answer should succeed FAIL assert_not_equals: Expect session description to be defined, but got undefined got disallowed value undefined
setLocalDescription() with type answer and null sdp should use lastAnswer generated from createAnswer FAIL promise_test: Unhandled rejection with value: object "InvalidParameterError: Empty or null SDP provided to setLocalDescription"
setLocalDescription() with answer not created by own createAnswer() should reject with InvalidModificationError FAIL assert_throws: function "function() { throw e }" threw object "InvalidStateError: Calling SetLocal without first calling CreateOffer/Answer is not supported." that is not a DOMException InvalidModificationError: property "code" is equal to 11, expected 13
Calling createOffer() and setLocalDescription() again after one round of local-offer/remote-answer should succeed FAIL assert_not_equals: Expect session description to be defined, but got undefined got disallowed value undefined
Switching role from answerer to offerer after going back to stable state should succeed FAIL assert_not_equals: Expect session description to be defined, but got undefined got disallowed value undefined
Calling setLocalDescription(answer) from stable state should reject with InvalidStateError FAIL promise_test: Unhandled rejection with value: object "InternalError: Cannot create an offer with no local tracks, no offerToReceiveAudio/Video, and no DataChannel."
Calling setLocalDescription(answer) from have-local-offer state should reject with InvalidStateError FAIL promise_test: Unhandled rejection with value: object "InternalError: Cannot create an offer with no local tracks, no offerToReceiveAudio/Video, and no DataChannel."
Test onsignalingstatechange event for Creating and setting offer multiple times should succeed PASS
Test onsignalingstatechange event for setLocalDescription() with valid answer should succeed PASS
Test onsignalingstatechange event for Calling createOffer() and setLocalDescription() again after one round of local-offer/remote-answer should succeed PASS
Test onsignalingstatechange event for Switching role from answerer to offerer after going back to stable state should succeed PASS
/webrtc/RTCPeerConnection-setRemoteDescription.html
Subtest Results Messages
TIMEOUT
setRemoteDescription with valid offer should succeed FAIL assert_not_equals: Expect session description to be defined, but got undefined got disallowed value undefined
Setting remote description multiple times with different offer should succeed FAIL promise_test: Unhandled rejection with value: object "InvalidStateError: Cannot set remote offer or answer in current state have-remote-offer"
setRemoteDescription(offer) should never resolve if connection is closed in parallel FAIL assert_unreached: Pending promise should never be resolved. Instead it is rejected with: InternalError: Cannot create an offer with no local tracks, no offerToReceiveAudio/Video, and no DataChannel. Reached unreachable code
setRemoteDescription(offer) with invalid SDP should reject with RTCError FAIL assert_equals: Expect error detail field to set to sdp-syntax-error expected (string) "sdp-syntax-error" but got (undefined) undefined
setRemoteDescription with invalid type and invalid SDP should reject with TypeError PASS
setRemoteDescription() with invalid SDP and stable state should reject with InvalidStateError PASS
setRemoteDescription() with valid state and answer should succeed FAIL assert_not_equals: Expect session description to be defined, but got undefined got disallowed value undefined
Calling setRemoteDescription() again after one round of remote-offer/local-answer should succeed FAIL promise_test: Unhandled rejection with value: object "InvalidSessionDescriptionError: Remote description changes the media type of m-line 0"
Switching role from offerer to answerer after going back to stable state should succeed FAIL assert_not_equals: Expect session description to be defined, but got undefined got disallowed value undefined
Calling setRemoteDescription(answer) from stable state should reject with InvalidStateError FAIL promise_test: Unhandled rejection with value: object "InternalError: Cannot create an offer with no local tracks, no offerToReceiveAudio/Video, and no DataChannel."
Calling setRemoteDescription(offer) from have-local-offer state should reject with InvalidStateError FAIL promise_test: Unhandled rejection with value: object "InternalError: Cannot create an offer with no local tracks, no offerToReceiveAudio/Video, and no DataChannel."
Calling setRemoteDescription(answer) from have-remote-offer state should reject with InvalidStateError FAIL promise_test: Unhandled rejection with value: object "InternalError: Cannot create an offer with no local tracks, no offerToReceiveAudio/Video, and no DataChannel."
setRemoteDescription should trigger ontrack event when the MSID of the stream is is parsed. FAIL assert_own_property: Expect pc to have ontrack event handler attribute expected property "ontrack" missing
Test onsignalingstatechange event for setRemoteDescription with valid offer should succeed PASS
Test onsignalingstatechange event for Setting remote description multiple times with different offer should succeed PASS
Test onsignalingstatechange event for setRemoteDescription() with valid state and answer should succeed PASS
Test onsignalingstatechange event for Calling setRemoteDescription() again after one round of remote-offer/local-answer should succeed TIMEOUT Test timed out
Test onsignalingstatechange event for Switching role from offerer to answerer after going back to stable state should succeed PASS
/webrtc/RTCSctpTransport-constructor.html
Subtest Results Messages
OK
setRemoteDescription() with answer containing data media should initialize pc.sctp FAIL assert_equals: expected (object) null but got (undefined) undefined
setLocalDescription() with answer containing data media should initialize pc.sctp FAIL assert_equals: expected (object) null but got (undefined) undefined

@w3c-bots
Copy link

w3c-bots commented Jun 8, 2017

View the complete job log.

Sauce (safari)

Testing web-platform-tests at revision 9d556ec
Using browser at version 10.0
Starting 10 test iterations
All results were stable

All results

6 tests ran
/webrtc/RTCPeerConnection-createAnswer.html
Subtest Results Messages
OK
createAnswer() with null remoteDescription should reject with InvalidStateError FAIL Can't find variable: RTCPeerConnection
createAnswer() after setting remote description should succeed FAIL Can't find variable: RTCPeerConnection
createAnswer() when connection is closed reject with InvalidStateError FAIL Can't find variable: RTCPeerConnection
createAnswer() when connection is closed in parallel should never resolve FAIL Can't find variable: RTCPeerConnection
/webrtc/RTCPeerConnection-createOffer.html
Subtest Results Messages
OK
createOffer() with no argument from newly created RTCPeerConnection should succeed FAIL Can't find variable: RTCPeerConnection
createOffer() and then setLocalDescription() should succeed FAIL Can't find variable: RTCPeerConnection
createOffer() after connection is closed should reject with InvalidStateError FAIL Can't find variable: RTCPeerConnection
createOffer() when connection is closed halfway should never resolve FAIL Can't find variable: RTCPeerConnection
When media stream is added when createOffer() is running in parallel, the result offer should contain the new media stream FAIL Can't find variable: RTCPeerConnection
createOffer() with offerToReceiveAudio should add audio line to all subsequent created offers FAIL Can't find variable: RTCPeerConnection
createOffer() with offerToReceiveVideo should add video line to all subsequent created offers FAIL Can't find variable: RTCPeerConnection
createOffer() with offerToReceiveAudio:true then offerToReceiveVideo:true should have result offer with both audio and video line FAIL Can't find variable: RTCPeerConnection
/webrtc/RTCPeerConnection-ondatachannel.html
Subtest Results Messages
OK
datachannel event should fire when new data channel is announced to the remote peer FAIL Can't find variable: RTCPeerConnection
Data channel created on remote peer should match the same configuration as local peer FAIL Can't find variable: RTCPeerConnection
Data channel created with negotiated set to true should not fire datachannel event on remote peer FAIL Can't find variable: RTCPeerConnection
/webrtc/RTCPeerConnection-setLocalDescription.html
Subtest Results Messages
OK
setLocalDescription with type offer and null sdp should use lastOffer generated from createOffer FAIL Can't find variable: RTCPeerConnection
setLocalDescription() with offer not created by own createOffer() should reject with InvalidModificationError FAIL Can't find variable: RTCPeerConnection
Set created offer other than last offer should reject with InvalidModificationError FAIL Can't find variable: RTCPeerConnection
Creating and setting offer multiple times should succeed FAIL Can't find variable: RTCPeerConnection
setLocalDescription(offer) should never resolve if connection is closed in parallel FAIL Can't find variable: RTCPeerConnection
setLocalDescription() with valid answer should succeed FAIL Can't find variable: RTCPeerConnection
setLocalDescription() with type answer and null sdp should use lastAnswer generated from createAnswer FAIL Can't find variable: RTCPeerConnection
setLocalDescription() with answer not created by own createAnswer() should reject with InvalidModificationError FAIL Can't find variable: RTCPeerConnection
Calling createOffer() and setLocalDescription() again after one round of local-offer/remote-answer should succeed FAIL Can't find variable: RTCPeerConnection
Switching role from answerer to offerer after going back to stable state should succeed FAIL Can't find variable: RTCPeerConnection
Calling setLocalDescription(answer) from stable state should reject with InvalidStateError FAIL Can't find variable: RTCPeerConnection
Calling setLocalDescription(answer) from have-local-offer state should reject with InvalidStateError FAIL Can't find variable: RTCPeerConnection
/webrtc/RTCPeerConnection-setRemoteDescription.html
Subtest Results Messages
OK
setRemoteDescription with valid offer should succeed FAIL Can't find variable: RTCPeerConnection
Setting remote description multiple times with different offer should succeed FAIL Can't find variable: RTCPeerConnection
setRemoteDescription(offer) should never resolve if connection is closed in parallel FAIL Can't find variable: RTCPeerConnection
setRemoteDescription(offer) with invalid SDP should reject with RTCError FAIL Can't find variable: RTCPeerConnection
setRemoteDescription with invalid type and invalid SDP should reject with TypeError FAIL Can't find variable: RTCPeerConnection
setRemoteDescription() with invalid SDP and stable state should reject with InvalidStateError FAIL Can't find variable: RTCPeerConnection
setRemoteDescription() with valid state and answer should succeed FAIL Can't find variable: RTCPeerConnection
Calling setRemoteDescription() again after one round of remote-offer/local-answer should succeed FAIL Can't find variable: RTCPeerConnection
Switching role from offerer to answerer after going back to stable state should succeed FAIL Can't find variable: RTCPeerConnection
Calling setRemoteDescription(answer) from stable state should reject with InvalidStateError FAIL Can't find variable: RTCPeerConnection
Calling setRemoteDescription(offer) from have-local-offer state should reject with InvalidStateError FAIL Can't find variable: RTCPeerConnection
Calling setRemoteDescription(answer) from have-remote-offer state should reject with InvalidStateError FAIL Can't find variable: RTCPeerConnection
setRemoteDescription should trigger ontrack event when the MSID of the stream is is parsed. FAIL Can't find variable: RTCPeerConnection
/webrtc/RTCSctpTransport-constructor.html
Subtest Results Messages
OK
setRemoteDescription() with answer containing data media should initialize pc.sctp FAIL Can't find variable: RTCPeerConnection
setLocalDescription() with answer containing data media should initialize pc.sctp FAIL Can't find variable: RTCPeerConnection

@w3c-bots
Copy link

w3c-bots commented Jun 8, 2017

*This report has been truncated because the total content is 118977 characters in length, which is in excess of GitHub.com's limit for comments (65536 characters).

View the complete job log.

Chrome (unstable)

Testing web-platform-tests at revision 9d556ec
Using browser at version 60.0.3112.20 dev
Starting 10 test iterations
All results were stable

All results

6 tests ran
/webrtc/RTCPeerConnection-createAnswer.html
Subtest Results Messages
OK
createAnswer() with null remoteDescription should reject with InvalidStateError FAIL assert_throws: function "function () { throw e }" threw object "OperationError: CreateAnswer can't be called before SetRemoteDescription." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
createAnswer() after setting remote description should succeed FAIL assert_false: Expect answer to not be instance of RTCSessionDescription expected false got true
createAnswer() when connection is closed reject with InvalidStateError PASS
createAnswer() when connection is closed in parallel should never resolve PASS
/webrtc/RTCPeerConnection-createOffer.html
Subtest Results Messages
OK
createOffer() with no argument from newly created RTCPeerConnection should succeed FAIL assert_false: Expect offer to not be instance of RTCSessionDescription expected false got true
createOffer() and then setLocalDescription() should succeed FAIL assert_not_equals: Expect session description to be defined, but got undefined got disallowed value undefined
createOffer() after connection is closed should reject with InvalidStateError PASS
createOffer() when connection is closed halfway should never resolve PASS
When media stream is added when createOffer() is running in parallel, the result offer should contain the new media stream FAIL pc.addTransceiver is not a function
createOffer() with offerToReceiveAudio should add audio line to all subsequent created offers FAIL assert_equals: Expect audio line to remain in created offer expected 1 but got 0
createOffer() with offerToReceiveVideo should add video line to all subsequent created offers FAIL assert_equals: Expect video line to remain in created offer expected 1 but got 0
createOffer() with offerToReceiveAudio:true then offerToReceiveVideo:true should have result offer with both audio and video line FAIL assert_equals: Expect audio line to remain in created offer expected 1 but got 0
Test onsignalingstatechange event for createOffer() and then setLocalDescription() should succeed PASS
/webrtc/RTCPeerConnection-ondatachannel.html
Subtest Results Messages
TIMEOUT
datachannel event should fire when new data channel is announced to the remote peer TIMEOUT Test timed out
Data channel created on remote peer should match the same configuration as local peer FAIL assert_equals: expected (string) "high" but got (undefined) undefined
Data channel created with negotiated set to true should not fire datachannel event on remote peer PASS
/webrtc/RTCPeerConnection-setLocalDescription.html
Subtest Results Messages
OK
setLocalDescription with type offer and null sdp should use lastOffer generated from createOffer FAIL promise_test: Unhandled rejection with value: object "OperationError: Failed to parse SessionDescription. Expect line: v="
setLocalDescription() with offer not created by own createOffer() should reject with InvalidModificationError FAIL assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 46:C3:34:5E:BB:13:65:53:B6:CF:5A:DB:37:54:38:FA:F4:87:DD:68:CB:2A:19:1A:C0:D6:C0:0F:18:BE:C6:DB Got: sha-256 EC:38:CA:0F:DA:E3:51:8F:5D:42:B5:DA:BD:6D:B5:3C:6B:88:05:01:94:71:2F:8C:9E:12:0D:96:F5:6B:7B:A5" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 7E:05:6B:B7:DB:C0:AD:40:FE:F6:B6:60:27:20:7E:0D:37:01:A2:D1:3F:C6:40:40:51:5A:68:81:0A:AB:A2:15 Got: sha-256 94:89:D7:4B:1F:D4:CA:AD:C3:82:26:FB:D7:AA:4C:7A:40:10:5F:A9:DD:D1:AB:99:37:CB:5F:C4:81:2A:76:0F" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 4F:4C:8F:27:35:D7:C1:E0:9A:D0:7C:32:3A:F8:F6:71:61:1B:30:06:0B:88:4D:CC:5E:03:95:5C:D3:60:C0:8C Got: sha-256 C4:AF:96:B7:18:63:14:71:B8:80:A4:FF:17:60:67:51:0B:56:4A:73:7C:69:A5:E9:70:BB:A8:E9:5B:A2:6D:39" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 10:A9:82:26:6A:CB:F7:87:DE:33:4A:6F:5A:3D:8E:5A:AC:A2:2A:99:60:F3:4C:55:AB:F0:9F:67:F2:2D:E3:E8 Got: sha-256 ED:E2:7C:79:C1:8F:B5:09:EE:2E:BF:1D:35:9B:E9:FF:41:1A:E0:9D:A0:06:1E:D2:41:20:81:98:AB:06:DD:30" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 E2:7D:3F:83:6D:F9:67:84:98:A4:38:03:CD:68:98:01:75:8B:5C:70:E6:F9:FE:AC:82:F5:DD:3B:C3:6D:4B:D5 Got: sha-256 2E:52:0F:30:DE:06:07:43:9A:8D:0D:22:5A:DE:5D:FA:AC:D9:55:57:40:63:94:1B:33:9D:EC:05:75:7B:35:EA" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 B8:70:BF:AA:F7:80:FB:69:54:44:4F:D2:DC:AC:A5:6A:AA:25:BB:A5:E1:C3:99:A9:23:E8:84:BB:07:91:A3:C8 Got: sha-256 1D:B7:02:8E:36:F6:D3:BD:A3:9D:09:D8:08:40:BC:85:1B:5E:6F:4B:D7:F9:5B:C3:53:49:A4:90:02:B7:81:04" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 49:10:F7:A5:1F:6D:50:58:6E:A1:FB:B2:28:B4:F3:D4:DC:A0:1E:21:EE:A8:51:0B:07:6B:6F:6A:07:5B:96:1D Got: sha-256 26:CD:71:1B:6C:57:3C:67:4F:09:C6:B4:E0:E5:13:50:4D:3B:7F:EB:8A:1E:BB:FB:46:1C:58:BB:92:42:93:B9" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 A9:5D:FC:6B:12:CF:F0:C8:87:E8:32:B8:62:85:A2:2B:B2:FF:21:60:33:4A:6B:69:52:49:E5:D4:F3:FA:62:42 Got: sha-256 12:39:FF:C7:20:DF:C4:4C:9F:61:9B:08:A2:00:5D:03:90:61:77:EB:D7:71:FE:6A:13:6A:91:2C:EA:B9:68:13" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 21:29:0F:BE:F1:8E:05:53:C4:5D:5F:86:5E:74:4E:BB:5B:7D:4C:F6:7A:50:16:E8:8B:58:3E:F5:D1:9A:5C:BB Got: sha-256 53:30:EA:1B:46:14:DE:F4:97:0E:F0:FC:AE:85:FA:9D:35:60:C3:B8:42:C6:01:29:00:C5:6E:04:C0:76:FD:70" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 8B:8A:20:B6:E3:86:6D:E5:E4:55:40:39:E1:5F:4A:EB:C1:22:31:C3:26:B0:5A:CB:69:29:47:AE:C1:FE:E2:59 Got: sha-256 06:82:85:EF:BD:F3:E5:3C:15:79:E3:E6:25:4F:72:2A:BC:16:3E:53:77:E4:E7:41:42:1D:B3:78:42:76:21:7F" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13
Set created offer other than last offer should reject with InvalidModificationError FAIL assert_unreached: Should have rejected: undefined Reached unreachable code
Creating and setting offer multiple times should succeed FAIL assert_not_equals: Expect session description to be defined, but got undefined got disallowed value undefined
setLocalDescription(offer) should never resolve if connection is closed in parallel PASS
setLocalDescription() with valid answer should succeed FAIL assert_not_equals: Expect session description to be defined, but got undefined got disallowed value undefined
setLocalDescription() with type answer and null sdp should use lastAnswer generated from createAnswer FAIL promise_test: Unhandled rejection with value: object "OperationError: Failed to parse SessionDescription. Expect line: v="
setLocalDescription() with answer not created by own createAnswer() should reject with InvalidModificationError FAIL `assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 30:31:27:7E:D8:0A:D4:2D:E8:D8:77:DA:10:B8:C4:33:CE:02:17:EF:B9:97:90:45:BC:27:72:E0:23:52:76:0B Got: sha-256 55:37:86:55:B9:0B:48:E6:F1:38:C8:CD:2D:EA:87:F5:D7:37:53:36:78:E8:27:AC:6A:66:B5:64:10:55:B2:C5" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 6E:DA:B0:1E:B2:57:1F:50:7F:67:65:D4:CB:59:2F:1B:89:56:EF:17:39:C7:97:31:D0:D8:B3:7D:EB:BC:70:68 Got: sha-256 E5:32:C3:BB:B8:7C:59:9A:9D:11:11:7A:2B:81:CC:3F:74:71:56:8B:12:69:9C:63:88:95:3E:64:80:AC:56:2A" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 93:6B:E1:7D:29:CD:E0:C5:85:65:67:EF:27:66:1B:EA:40:CF:15:A6:EC:57:9A:69:26:0D:52:38:88:75:C5:8D Got: sha-256 45:C8:0A:33:2A:41:80:34:26:02:88:D6:0D:C5:CF:7B:17:71:5C:5E:CF:84:AD:09:3B:93:3F:CD:91:13:40:13" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 F8:A8:0B:B7:DA:92:20:32:8B:3F:08:B1:58:CA:66:91:CD:04:A7:A5:16:67:23:86:17:77:19:D4:0F:DB:CC:4A Got: sha-256 A2:A1:AA:F8:2C:0B:00:32:67:E0:52:76:10:D8:7B:DB:8A:CB:A9:00:EE:1C:C9:C5:B4:62:9D:58:B2:8A:87:FF" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 FF:8E:1A:F8:6C:99:5F:BC:93:F6:D7:A7:DE:8E:24:D9:21:97:50:43:30:FF:0F:FA:38:8B:E1:3F:FF:60:53:99 Got: sha-256 B9:36:44:96:3A:00:6D:32:38:05:47:F6:34:AD:24:AF:7E:BB:C9:BA:A4:26:89:38:A4:CD:27:99:D3:99:FD:A1" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 3E:FE:98:1E:3C:E6:30:17:54:3D:5F:1F:89:0F:FD:8A:B1:09:13:90:47:A5:6C:0A:49:D2:61:57:5B:8B:19:71 Got: sha-256 B9:77:0E:50:8A:38:D8:F8:4C:3F:8C:F1:3A:74:AB:D8:1E:63:49:2A:CD:37:1A:8F:E0:70:41:21:42:FF:B5:C4" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 D0:AC:7D:9A:7C:DE:9C:B1:FD:76:BD:23:E2:49:14:B5:A1:E2:F9:3B:00:8C:C6:65:81:E0:D5:6D:30:E7:78:97 Got: sha-256 56:2D:D3:89:AD:E3:F0:59:F6:28:11:BD:CB:9F:2A:7E:4F:41:BF:11:A6:6A:04:96:46:8C:10:C6:30:AD:AA:44" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13;assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to push down transport description: Local fingerprint does not match identity. Expected: sha-256 DD:7C:76:06:3C:FB:8F:8E:42:B3:7C:77:3D:B3:EB:52:03:6E:1E:D1:CD:82:F3:74:48:72:54:B9:D9:E9:3E:6E Got: sha-256 22:6B:30:D3:C9:1C:03:11:92:E7:85:E6:D1:B0:4B:94:B6:C9:4C:C7:3E:82:27:A6:52:1D:8E:B1:3E:17:2F:79" that is not a DOM

@w3c-bots
Copy link

w3c-bots commented Jun 8, 2017

View the complete job log.

Sauce (MicrosoftEdge)

Testing web-platform-tests at revision 9d556ec
Using browser at version 14.14393
Starting 10 test iterations
All results were stable

All results

6 tests ran
/webrtc/RTCPeerConnection-createAnswer.html
Subtest Results Messages
OK
createAnswer() with null remoteDescription should reject with InvalidStateError FAIL 'RTCPeerConnection' is undefined
createAnswer() after setting remote description should succeed FAIL 'RTCPeerConnection' is undefined
createAnswer() when connection is closed reject with InvalidStateError FAIL 'RTCPeerConnection' is undefined
createAnswer() when connection is closed in parallel should never resolve FAIL 'RTCPeerConnection' is undefined
/webrtc/RTCPeerConnection-createOffer.html
Subtest Results Messages
OK
createOffer() with no argument from newly created RTCPeerConnection should succeed FAIL 'RTCPeerConnection' is undefined
createOffer() and then setLocalDescription() should succeed FAIL 'RTCPeerConnection' is undefined
createOffer() after connection is closed should reject with InvalidStateError FAIL 'RTCPeerConnection' is undefined
createOffer() when connection is closed halfway should never resolve FAIL 'RTCPeerConnection' is undefined
When media stream is added when createOffer() is running in parallel, the result offer should contain the new media stream FAIL 'RTCPeerConnection' is undefined
createOffer() with offerToReceiveAudio should add audio line to all subsequent created offers FAIL 'RTCPeerConnection' is undefined
createOffer() with offerToReceiveVideo should add video line to all subsequent created offers FAIL 'RTCPeerConnection' is undefined
createOffer() with offerToReceiveAudio:true then offerToReceiveVideo:true should have result offer with both audio and video line FAIL 'RTCPeerConnection' is undefined
/webrtc/RTCPeerConnection-ondatachannel.html
Subtest Results Messages
OK
datachannel event should fire when new data channel is announced to the remote peer FAIL 'RTCPeerConnection' is undefined
Data channel created on remote peer should match the same configuration as local peer FAIL 'RTCPeerConnection' is undefined
Data channel created with negotiated set to true should not fire datachannel event on remote peer FAIL 'RTCPeerConnection' is undefined
/webrtc/RTCPeerConnection-setLocalDescription.html
Subtest Results Messages
OK
setLocalDescription with type offer and null sdp should use lastOffer generated from createOffer FAIL 'RTCPeerConnection' is undefined
setLocalDescription() with offer not created by own createOffer() should reject with InvalidModificationError FAIL 'RTCPeerConnection' is undefined
Set created offer other than last offer should reject with InvalidModificationError FAIL 'RTCPeerConnection' is undefined
Creating and setting offer multiple times should succeed FAIL 'RTCPeerConnection' is undefined
setLocalDescription(offer) should never resolve if connection is closed in parallel FAIL 'RTCPeerConnection' is undefined
setLocalDescription() with valid answer should succeed FAIL 'RTCPeerConnection' is undefined
setLocalDescription() with type answer and null sdp should use lastAnswer generated from createAnswer FAIL 'RTCPeerConnection' is undefined
setLocalDescription() with answer not created by own createAnswer() should reject with InvalidModificationError FAIL 'RTCPeerConnection' is undefined
Calling createOffer() and setLocalDescription() again after one round of local-offer/remote-answer should succeed FAIL 'RTCPeerConnection' is undefined
Switching role from answerer to offerer after going back to stable state should succeed FAIL 'RTCPeerConnection' is undefined
Calling setLocalDescription(answer) from stable state should reject with InvalidStateError FAIL 'RTCPeerConnection' is undefined
Calling setLocalDescription(answer) from have-local-offer state should reject with InvalidStateError FAIL 'RTCPeerConnection' is undefined
/webrtc/RTCPeerConnection-setRemoteDescription.html
Subtest Results Messages
OK
setRemoteDescription with valid offer should succeed FAIL 'RTCPeerConnection' is undefined
Setting remote description multiple times with different offer should succeed FAIL 'RTCPeerConnection' is undefined
setRemoteDescription(offer) should never resolve if connection is closed in parallel FAIL 'RTCPeerConnection' is undefined
setRemoteDescription(offer) with invalid SDP should reject with RTCError FAIL 'RTCPeerConnection' is undefined
setRemoteDescription with invalid type and invalid SDP should reject with TypeError FAIL 'RTCPeerConnection' is undefined
setRemoteDescription() with invalid SDP and stable state should reject with InvalidStateError FAIL 'RTCPeerConnection' is undefined
setRemoteDescription() with valid state and answer should succeed FAIL 'RTCPeerConnection' is undefined
Calling setRemoteDescription() again after one round of remote-offer/local-answer should succeed FAIL 'RTCPeerConnection' is undefined
Switching role from offerer to answerer after going back to stable state should succeed FAIL 'RTCPeerConnection' is undefined
Calling setRemoteDescription(answer) from stable state should reject with InvalidStateError FAIL 'RTCPeerConnection' is undefined
Calling setRemoteDescription(offer) from have-local-offer state should reject with InvalidStateError FAIL 'RTCPeerConnection' is undefined
Calling setRemoteDescription(answer) from have-remote-offer state should reject with InvalidStateError FAIL 'RTCPeerConnection' is undefined
setRemoteDescription should trigger ontrack event when the MSID of the stream is is parsed. FAIL 'RTCPeerConnection' is undefined
/webrtc/RTCSctpTransport-constructor.html
Subtest Results Messages
OK
setRemoteDescription() with answer containing data media should initialize pc.sctp FAIL 'RTCPeerConnection' is undefined
setLocalDescription() with answer containing data media should initialize pc.sctp FAIL 'RTCPeerConnection' is undefined

Copy link
Contributor

@rwaldron rwaldron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small fix. I know you're not done yet, but I've begun updating the coverage spec as well: https://rwaldron.github.io/webrtc-pc/#rtcdatachannel (I'll keep tracking as you progress)

// Helper function to exchange ice candidates between
// two local peer connections
function exchangeIceCandidates(pc1, pc2) {
function doExchange(localPc, remotePc) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move doExchange outside of exchangeIceCandidates (there are no closures)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know. But without proper module system I don't really want to expose the private helper function globally. Putting it as an inner function helps indicate that it is private without going through too much hacks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, that's a fair argument ;P


// The following helper functions are called from RTCPeerConnection-helper.js:
// exchangeIceCandidates
// doSignalingHandshake
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@soareschen soareschen force-pushed the rtcpeerconnection-ondatachannel branch from b459b50 to 5302c6f Compare June 9, 2017 09:13
@soareschen
Copy link
Contributor Author

soareschen commented Jun 9, 2017

I have rebased and added a few more tests.

I also removed the tests on the connection states. Turns out my assumption was wrong and the underlying transports can be of any state regardless of whether the upper layer transport is connected. Will figure other way to test the peer connection states.

This is now ready for review and merge.

@rwaldron
Copy link
Contributor

Great work!

@rwaldron rwaldron merged commit 6d8970d into web-platform-tests:master Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants