Changeset 281985 in webkit
- Timestamp:
- Sep 3, 2021 4:30:15 AM (11 months ago)
- Location:
- trunk
- Files:
-
- 21 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt (modified) (1 diff)
-
LayoutTests/fast/mediastream/RTCPeerConnection-stable-expected.txt (modified) (4 diffs)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-SLD-SRD-timing.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-operations.https-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-restartIce.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-pranswer-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-rollback-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-offer-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp (modified) (2 diffs)
-
Source/WebCore/platform/mediastream/RTCSignalingState.h (modified) (1 diff)
-
Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp (modified) (2 diffs)
-
Source/WebCore/testing/MockLibWebRTCPeerConnection.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r281981 r281985 1 2021-09-03 Youenn Fablet <youenn@apple.com> 2 3 Signaling state check when applying a local or remote description is no longer aligned with the WebRTC spec 4 https://bugs.webkit.org/show_bug.cgi?id=229138 5 6 Reviewed by Eric Carlson. 7 8 * fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt: 9 * fast/mediastream/RTCPeerConnection-stable-expected.txt: 10 1 11 2021-09-03 Youenn Fablet <youenn@apple.com> 2 12 -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt
r281631 r281985 21 21 22 22 *** Try setting local descriptions with bad types for the current state 23 PASS promise pc.setRemoteDescription({type:'answer', sdp:remoteOffer1.sdp}); rejected with InvalidStateError: Remote description type 2 is incompatible with current signaling state 024 PASS promise pc.setRemoteDescription({type:'pranswer', sdp:remoteOffer1.sdp}); rejected with InvalidStateError: Remote description type 1 is incompatible with current signaling state 023 PASS promise pc.setRemoteDescription({type:'answer', sdp:remoteOffer1.sdp}); rejected with InvalidStateError: The object is in an invalid state. 24 PASS promise pc.setRemoteDescription({type:'pranswer', sdp:remoteOffer1.sdp}); rejected with InvalidStateError: The object is in an invalid state. 25 25 26 26 *** Create (remote) offer with video (remoteOffer2) -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-stable-expected.txt
r281631 r281985 7 7 PASS pc.setLocalDescription(sessionDescription).then(finishIfSucceeded, requestFailed1); did not throw exception. 8 8 PASS setLocalDescription failed. 9 FAIL errorReason.name should be InvalidSessionDescriptionError. Was InvalidStateError.9 FAIL errorReason.name should be InvalidSessionDescriptionError. Was OperationError. 10 10 FAIL pc.localDescription should throw an exception. Was null. 11 11 FAIL pc.remoteDescription should throw an exception. Was null. … … 13 13 PASS pc.setLocalDescription(sessionDescription).then(finishIfSucceeded, requestFailed2); did not throw exception. 14 14 PASS setLocalDescription failed. 15 FAIL errorReason.name should be InvalidSessionDescriptionError. Was InvalidStateError.15 FAIL errorReason.name should be InvalidSessionDescriptionError. Was OperationError. 16 16 FAIL pc.localDescription should throw an exception. Was null. 17 17 FAIL pc.remoteDescription should throw an exception. Was null. … … 19 19 PASS pc.setRemoteDescription(sessionDescription).then(finishIfSucceeded, requestFailed3); did not throw exception. 20 20 PASS setRemoteDescription failed. 21 FAIL errorReason.name should be InvalidSessionDescriptionError. Was InvalidStateError.21 FAIL errorReason.name should be InvalidSessionDescriptionError. Was SyntaxError. 22 22 FAIL pc.localDescription should throw an exception. Was null. 23 23 FAIL pc.remoteDescription should throw an exception. Was null. … … 25 25 PASS pc.setRemoteDescription(sessionDescription).then(finishIfSucceeded, requestFailed4); did not throw exception. 26 26 PASS setRemoteDescription failed. 27 FAIL errorReason.name should be InvalidSessionDescriptionError. Was InvalidStateError.27 FAIL errorReason.name should be InvalidSessionDescriptionError. Was SyntaxError. 28 28 FAIL pc.localDescription should throw an exception. Was null. 29 29 FAIL pc.remoteDescription should throw an exception. Was null. -
trunk/LayoutTests/imported/w3c/ChangeLog
r281981 r281985 1 2021-09-03 Youenn Fablet <youenn@apple.com> 2 3 Signaling state check when applying a local or remote description is no longer aligned with the WebRTC spec 4 https://bugs.webkit.org/show_bug.cgi?id=229138 5 6 Reviewed by Eric Carlson. 7 8 Rebasing tests. 9 Some tests are going from PASS to FAIL: 10 - LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-operations.https.html: we do not support yet rollback. 11 - LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-pranswer.html: is no longer throwing the right exception (and we are not supporting pranswer yet). 12 - LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription.html: we are throwing with a different exception. 13 14 * web-platform-tests/webrtc/RTCPeerConnection-SLD-SRD-timing.https-expected.txt: 15 * web-platform-tests/webrtc/RTCPeerConnection-operations.https-expected.txt: 16 * web-platform-tests/webrtc/RTCPeerConnection-restartIce.https-expected.txt: 17 * web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt: 18 * web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt: 19 * web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer-expected.txt: 20 * web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-pranswer-expected.txt: 21 * web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-rollback-expected.txt: 22 * web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-expected.txt: 23 * web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-offer-expected.txt: 24 * web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback-expected.txt: 25 * web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt: 26 1 27 2021-09-03 Youenn Fablet <youenn@apple.com> 2 28 -
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-SLD-SRD-timing.https-expected.txt
r281631 r281985 1 1 2 FAIL setLocalDescription and setRemoteDescription are not racy promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 0 is incompatible with current signaling state 1"2 FAIL setLocalDescription and setRemoteDescription are not racy promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to set remote offer sdp: Called in wrong state: have-local-offer" 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-operations.https-expected.txt
r281981 r281985 6 6 FAIL createOffer must detect InvalidStateError synchronously when chain is empty (prerequisite) assert_equals: expected "InvalidStateError" but got "Error" 7 7 PASS createAnswer must detect InvalidStateError synchronously when chain is empty (prerequisite) 8 PASS SLD(rollback) must detect InvalidStateError synchronously when chain is empty 8 FAIL SLD(rollback) must detect InvalidStateError synchronously when chain is empty assert_equals: promise rejected on same task expected "rejected" but got "pending" 9 9 FAIL addIceCandidate must detect InvalidStateError synchronously when chain is empty assert_equals: expected "InvalidStateError" but got "TypeError" 10 10 PASS replaceTrack must detect InvalidStateError synchronously when chain is empty and transceiver is stopped … … 27 27 PASS receiver.getStats does NOT use the operations chain 28 28 FAIL addIceCandidate chains onto SRD, fails before assert_equals: expected "InvalidStateError" but got "OperationError" 29 FAIL Operations queue not vulnerable to recursion by chained negotiationneeded promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 0 is incompatible with current signaling state 1"29 FAIL Operations queue not vulnerable to recursion by chained negotiationneeded promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to set remote offer sdp: Called in wrong state: have-local-offer" 30 30 FAIL Pack operations queue with implicit offer and answer promise_test: Unhandled rejection with value: object "OperationError: Expect line: v=" 31 31 TIMEOUT Negotiate solely by operations queue and signaling state Test timed out -
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-restartIce.https-expected.txt
r281631 r281985 11 11 PASS restartIce() is satisfied by remote ICE restart 12 12 PASS restartIce() trumps {iceRestart: false} 13 FAIL restartIce() survives rollback promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1" 13 PASS restartIce() survives rollback 14 14 FAIL restartIce() survives remote offer containing partial restart assert_false: Restarted 2 expected false got true 15 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt
r281631 r281985 2 2 PASS setLocalDescription(offer) with m= section should assign mid to corresponding transceiver 3 3 PASS setRemoteDescription(offer) with m= section and no existing transceiver should create corresponding transceiver 4 FAIL setLocalDescription(rollback) should unset transceiver.mid promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1" 5 FAIL setLocalDescription(rollback) should only unset transceiver mids associated with current round promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1" 6 FAIL setRemoteDescription(rollback) should remove newly created transceiver from transceiver list promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2"4 PASS setLocalDescription(rollback) should unset transceiver.mid 5 PASS setLocalDescription(rollback) should only unset transceiver mids associated with current round 6 FAIL setRemoteDescription(rollback) should remove newly created transceiver from transceiver list assert_array_equals: Expect transceiver to be removed from pc2's transceiver list lengths differ, expected array [] length 0, got [object "[object RTCRtpTransceiver]"] length 1 7 7 PASS setRemoteDescription should set transceiver inactive if its corresponding m section is rejected 8 8 -
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt
r281631 r281985 2 2 PASS setLocalDescription() with valid answer should succeed 3 3 FAIL setLocalDescription() with type answer and null sdp should use lastAnswer generated from createAnswer promise_test: Unhandled rejection with value: object "OperationError: Expect line: v=" 4 FAIL setLocalDescription() with answer not created by own createAnswer() should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to apply the description for m= section with mid='0': Local fingerprint does not match identity. Expected: sha-256 0D:E2:FA:94:4D:00:FD:19:00:18:DC:96:C0:5D:20:81:53:91:E1:DE:73:E9:B6:99:A3:64:B9:F1:58:69:81:18 Got: sha-256 94:25:42:B4:B7:8C:8C:F5:DF:C5:ED:6A:82:03:44:0D:4E:1B:0A:B7:76:D6:BE:DA:72:80:7D:3D:6C:78:2B:F3" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 135 FAIL Calling setLocalDescription(answer) from stable state should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "InvalidStateError: Local description type 2 is incompatible with current signaling state 0" that is not a DOMException InvalidModificationError: property "code" is equal to 11, expected 136 FAIL Calling setLocalDescription(answer) from have-local-offer state should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "InvalidStateError: Local description type 2 is incompatible with current signaling state 1" that is not a DOMException InvalidModificationError: property "code" is equal to 11, expected 137 FAIL Setting previously generated answer after a call to createOffer should work promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2" 4 FAIL setLocalDescription() with answer not created by own createAnswer() should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to apply the description for m= section with mid='0': Local fingerprint does not match identity. Expected: sha-256 5A:90:E6:76:2B:68:BA:02:57:FC:0E:37:B6:BF:A7:1E:79:58:12:D4:6C:0D:84:CB:08:D2:F7:BB:01:9E:B9:CB Got: sha-256 05:68:D4:79:D9:47:72:10:F1:2A:F8:81:C7:C0:C5:28:4C:9B:B9:90:9A:60:81:E6:2C:31:35:E5:9D:C7:E2:0A" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13 5 FAIL Calling setLocalDescription(answer) from stable state should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "InvalidStateError: Failed to set local answer sdp: no pending remote description." that is not a DOMException InvalidModificationError: property "code" is equal to 11, expected 13 6 FAIL Calling setLocalDescription(answer) from have-local-offer state should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "InvalidStateError: Failed to set local answer sdp: no pending remote description." that is not a DOMException InvalidModificationError: property "code" is equal to 11, expected 13 7 PASS Setting previously generated answer after a call to createOffer should work 8 8 FAIL setLocalDescription(answer) should update internal state with a queued task, in the right order assert_not_equals: pendingRemoteDescription should not be set synchronously after a call to sLD got disallowed value null 9 9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer-expected.txt
r281631 r281985 2 2 PASS setLocalDescription with valid offer should succeed 3 3 FAIL setLocalDescription with type offer and null sdp should use lastOffer generated from createOffer promise_test: Unhandled rejection with value: object "OperationError: Expect line: v=" 4 FAIL setLocalDescription() with offer not created by own createOffer() should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to apply the description for m= section with mid='0': Local fingerprint does not match identity. Expected: sha-256 AC:89:BE:E6:A4:DB:0A:BB:A7:A5:85:7E:53:F6:60:11:D8:97:44:6D:D0:A1:4C:32:80:B3:03:94:C8:83:AD:A8 Got: sha-256 34:AF:27:F0:FE:EF:83:BC:1D:76:C6:89:C7:D9:81:7C:C3:FB:DA:F0:04:CF:D3:81:FC:62:FA:9A:84:B5:3B:E8" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 134 FAIL setLocalDescription() with offer not created by own createOffer() should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to apply the description for m= section with mid='0': Local fingerprint does not match identity. Expected: sha-256 CB:DD:6C:16:C3:EB:2B:91:4B:45:55:4F:C1:45:DC:BF:53:7C:F4:4B:F5:07:80:18:31:8A:51:3A:35:0E:36:4C Got: sha-256 DD:D9:E2:F3:33:68:9A:4C:1D:FD:BE:CA:4E:0F:35:78:FC:B5:2A:0A:C8:E5:CD:E2:93:7B:C7:7A:99:C2:31:63" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13 5 5 FAIL Set created offer other than last offer should reject with InvalidModificationError assert_unreached: Should have rejected: undefined Reached unreachable code 6 6 PASS Creating and setting offer multiple times should succeed 7 FAIL Setting previously generated offer after a call to createAnswer should work promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2" 7 PASS Setting previously generated offer after a call to createAnswer should work 8 8 FAIL Negotiation works when there has been a repeated setLocalDescription(offer) assert_equals: expected 1 but got 0 9 9 FAIL setLocalDescription(offer) should update internal state with a queued task, in the right order assert_equals: pendingRemoteDescription should never be set due to sLD expected null but got object "[object RTCSessionDescription]" -
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-pranswer-expected.txt
r281631 r281985 1 1 2 PASS setLocalDescription(pranswer) from stable state should reject with InvalidStateError 2 FAIL setLocalDescription(pranswer) from stable state should reject with InvalidStateError promise_rejects_dom: function "function () { throw e }" threw object "OperationError: Failed to set local pranswer sdp: Called in wrong state: stable" that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 3 3 FAIL setLocalDescription(pranswer) should succeed assert_equals: expected null but got object "[object RTCSessionDescription]" 4 4 PASS setLocalDescription(pranswer) can be applied multiple times while still in have-local-pranswer -
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-rollback-expected.txt
r281631 r281985 1 1 2 FAIL setLocalDescription(rollback) from have-local-offer state should reset back to stable state promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1" 2 PASS setLocalDescription(rollback) from have-local-offer state should reset back to stable state 3 3 PASS setLocalDescription(rollback) from stable state should reject with InvalidStateError 4 4 PASS setLocalDescription(rollback) after setting answer description should reject with InvalidStateError 5 FAIL setLocalDescription(rollback) should ignore invalid sdp content and succeed promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1" 6 FAIL setLocalDescription(rollback) should update internal state with a queued tassk, in the right order promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1"5 PASS setLocalDescription(rollback) should ignore invalid sdp content and succeed 6 FAIL setLocalDescription(rollback) should update internal state with a queued tassk, in the right order assert_not_equals: pendingLocalDescription should not be set synchronously after a call to sLD got disallowed value null 7 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-expected.txt
r281631 r281985 1 1 2 2 PASS setRemoteDescription with invalid type and invalid SDP should reject with TypeError 3 PASS setRemoteDescription() with invalid SDP and stable state should reject with InvalidStateError 3 FAIL setRemoteDescription() with invalid SDP and stable state should reject with InvalidStateError assert_throws_dom: function "() => { throw e }" threw object "SyntaxError: Expect line: v=" that is not a DOMException InvalidStateError: property "code" is equal to 12, expected 11 4 4 PASS Negotiation should fire signalingsstate events 5 5 PASS Calling setRemoteDescription() again after one round of remote-offer/local-answer should succeed -
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-offer-expected.txt
r281631 r281985 6 6 PASS setRemoteDescription multiple times with different offer should succeed 7 7 FAIL setRemoteDescription(offer) with invalid SDP should reject with RTCError assert_equals: Expect error detail field to set to sdp-syntax-error expected (string) "sdp-syntax-error" but got (undefined) undefined 8 FAIL setRemoteDescription(offer) from have-local-offer should roll back and succeed promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 0 is incompatible with current signaling state 1"8 FAIL setRemoteDescription(offer) from have-local-offer should roll back and succeed promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to set remote offer sdp: Called in wrong state: have-local-offer" 9 9 TIMEOUT setRemoteDescription(offer) from have-local-offer fires signalingstatechange twice Test timed out 10 10 NOTRUN setRemoteDescription(offer) in stable should update internal state with a queued task, in the right order -
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback-expected.txt
r281926 r281985 1 1 2 FAIL setRemoteDescription(rollback) in have-remote-offer state should revert to stable state promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2" 2 PASS setRemoteDescription(rollback) in have-remote-offer state should revert to stable state 3 3 PASS setRemoteDescription(rollback) from stable state should reject with InvalidStateError 4 FAIL setRemoteDescription(rollback) should ignore invalid sdp content and succeed promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2" 5 FAIL local offer created before setRemoteDescription(remote offer) then rollback should still be usable promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2" 6 FAIL local offer created before setRemoteDescription(remote offer) with different transceiver level assignments then rollback should still be usable promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2" 7 FAIL rollback of a remote offer should remove a transceiver promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2"8 FAIL rollback of a remote offer should remove touched transceiver promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2"9 FAIL rollback of a remote offer should keep a transceiver promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2" 10 FAIL rollback of a remote offer should keep a transceiver created by addtrack promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2" 11 FAIL rollback of a remote offer should keep a transceiver without tracks promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2" 12 FAIL explicit rollback of local offer should remove transceivers and transport promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1" 13 FAIL when using addTransceiver, implicit rollback of a local offer should visit stable state, but not fire negotiationneeded until we settle in stable promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 0 is incompatible with current signaling state 1"14 FAIL when using addTrack, implicit rollback of a local offer should visit stable state, but not fire negotiationneeded promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 0 is incompatible with current signaling state 1"15 FAIL rollback of a remote offer to negotiated stable state should enable applying of a local offer promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2" 16 FAIL rollback of a local offer to negotiated stable state should enable applying of a remote offer promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1" 17 FAIL rollback a local offer with audio direction change to negotiated stable state and then add video receiver promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1" 18 FAIL two transceivers with same mids promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 0 is incompatible with current signaling state 1"19 FAIL onremovetrack fires during remote rollback promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2" 4 PASS setRemoteDescription(rollback) should ignore invalid sdp content and succeed 5 PASS local offer created before setRemoteDescription(remote offer) then rollback should still be usable 6 PASS local offer created before setRemoteDescription(remote offer) with different transceiver level assignments then rollback should still be usable 7 FAIL rollback of a remote offer should remove a transceiver assert_equals: expected 0 but got 1 8 FAIL rollback of a remote offer should remove touched transceiver assert_equals: expected 0 but got 1 9 PASS rollback of a remote offer should keep a transceiver 10 PASS rollback of a remote offer should keep a transceiver created by addtrack 11 PASS rollback of a remote offer should keep a transceiver without tracks 12 PASS explicit rollback of local offer should remove transceivers and transport 13 FAIL when using addTransceiver, implicit rollback of a local offer should visit stable state, but not fire negotiationneeded until we settle in stable promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to set remote offer sdp: Called in wrong state: have-local-offer" 14 FAIL when using addTrack, implicit rollback of a local offer should visit stable state, but not fire negotiationneeded promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to set remote offer sdp: Called in wrong state: have-local-offer" 15 PASS rollback of a remote offer to negotiated stable state should enable applying of a local offer 16 PASS rollback of a local offer to negotiated stable state should enable applying of a remote offer 17 PASS rollback a local offer with audio direction change to negotiated stable state and then add video receiver 18 FAIL two transceivers with same mids promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to set remote offer sdp: Called in wrong state: have-local-offer" 19 PASS onremovetrack fires during remote rollback 20 20 FAIL rollback of a remote offer with stream changes assert_equals: expected 2 but got 1 21 21 PASS removeTrack() with a sender being rolled back does not crash or throw 22 FAIL Implicit rollback with only a datachannel works promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 0 is incompatible with current signaling state 1"22 FAIL Implicit rollback with only a datachannel works promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to set remote offer sdp: Called in wrong state: have-local-offer" 23 23 -
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt
r281631 r281985 22 22 PASS checkRemoveAndReadd 23 23 PASS checkAddTrackExistingTransceiverThenRemove 24 FAIL checkRemoveTrackNegotiation promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2"24 FAIL checkRemoveTrackNegotiation assert_equals: Rollback should have added two tracks expected 2 but got 0 25 25 FAIL checkMute assert_true: expected true got false 26 26 FAIL checkStop assert_equals: expected "[{currentDirection:\"sendrecv\",direction:\"stopped\",receiver:{track:{kind:\"audio\",readyState:\"ended\"}},sender:{track:{kind:\"audio\"}}}]" but got "[{currentDirection:\"sendrecv\",direction:\"inactive\",receiver:{track:{kind:\"audio\",readyState:\"ended\"}},sender:{track:null}}]" … … 31 31 FAIL checkStopAfterSetLocalAnswer assert_equals: expected "[{currentDirection:\"sendrecv\",direction:\"stopped\"}]" but got "[{currentDirection:\"sendrecv\",direction:\"inactive\"}]" 32 32 PASS checkStopAfterClose 33 FAIL checkLocalRollback promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1"34 FAIL checkRollbackAndSetRemoteOfferWithDifferentType promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1" 35 FAIL checkRemoteRollback promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2"33 FAIL checkLocalRollback assert_equals: expected "[{direction:\"stopped\"}]" but got "[{direction:\"inactive\"}]" 34 PASS checkRollbackAndSetRemoteOfferWithDifferentType 35 FAIL checkRemoteRollback assert_equals: expected "[]" but got "[{}]" 36 36 FAIL checkMsectionReuse assert_equals: expected "[{currentDirection:null,mid:null}]" but got "[{currentDirection:\"inactive\",mid:\"0\"}]" 37 37 PASS checkStopAfterCreateOfferWithReusedMsection 38 FAIL checkAddIceCandidateToStoppedTransceiver promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 0 is incompatible with current signaling state 1" 38 PASS checkAddIceCandidateToStoppedTransceiver 39 39 FAIL checkBundleTagRejected promise_test: Unhandled rejection with value: object "InvalidAccessError: Failed to set remote offer sdp: The m= section with mid='1' should be rejected." 40 40 -
trunk/Source/WebCore/ChangeLog
r281984 r281985 1 2021-09-03 Youenn Fablet <youenn@apple.com> 2 3 Signaling state check when applying a local or remote description is no longer aligned with the WebRTC spec 4 https://bugs.webkit.org/show_bug.cgi?id=229138 5 6 Reviewed by Eric Carlson. 7 8 These checks have been removed from the spec and are no longer valid. 9 Covered by rebased tests. 10 11 * Modules/mediastream/PeerConnectionBackend.cpp: 12 (WebCore::PeerConnectionBackend::setLocalDescription): 13 (WebCore::PeerConnectionBackend::setRemoteDescription): 14 (WebCore::isLocalDescriptionTypeValidForState): Deleted. 15 (WebCore::isRemoteDescriptionTypeValidForState): Deleted. 16 * testing/MockLibWebRTCPeerConnection.cpp: 17 (WebCore::MockLibWebRTCPeerConnection::SetLocalDescription): 18 (WebCore::MockLibWebRTCPeerConnection::SetRemoteDescription): 19 * testing/MockLibWebRTCPeerConnection.h: 20 1 21 2021-09-03 David Kilzer <ddkilzer@apple.com> 2 22 -
trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp
r281981 r281985 161 161 } 162 162 163 static inline bool isLocalDescriptionTypeValidForState(RTCSdpType type, RTCSignalingState state)164 {165 switch (state) {166 case RTCSignalingState::Stable:167 return type == RTCSdpType::Offer;168 case RTCSignalingState::HaveLocalOffer:169 return type == RTCSdpType::Offer;170 case RTCSignalingState::HaveRemoteOffer:171 return type == RTCSdpType::Answer || type == RTCSdpType::Pranswer;172 case RTCSignalingState::HaveLocalPranswer:173 return type == RTCSdpType::Answer || type == RTCSdpType::Pranswer;174 default:175 return false;176 };177 178 ASSERT_NOT_REACHED();179 return false;180 }181 182 163 void PeerConnectionBackend::setLocalDescription(const RTCSessionDescription* sessionDescription, DOMPromiseDeferred<void>&& promise) 183 164 { 184 165 ASSERT(!m_peerConnection.isClosed()); 185 186 if (sessionDescription && !isLocalDescriptionTypeValidForState(sessionDescription->type(), m_peerConnection.signalingState())) {187 promise.reject(InvalidStateError, makeString("Local description type ", sessionDescription->type(), " is incompatible with current signaling state ", m_peerConnection.signalingState()));188 return;189 }190 166 191 167 m_setDescriptionPromise = WTF::makeUnique<DOMPromiseDeferred<void>>(WTFMove(promise)); … … 221 197 } 222 198 223 static inline bool isRemoteDescriptionTypeValidForState(RTCSdpType type, RTCSignalingState state)224 {225 switch (state) {226 case RTCSignalingState::Stable:227 return type == RTCSdpType::Offer;228 case RTCSignalingState::HaveLocalOffer:229 return type == RTCSdpType::Answer || type == RTCSdpType::Pranswer;230 case RTCSignalingState::HaveRemoteOffer:231 return type == RTCSdpType::Offer;232 case RTCSignalingState::HaveRemotePranswer:233 return type == RTCSdpType::Answer || type == RTCSdpType::Pranswer;234 default:235 return false;236 };237 238 ASSERT_NOT_REACHED();239 return false;240 }241 242 199 void PeerConnectionBackend::setRemoteDescription(const RTCSessionDescription& sessionDescription, DOMPromiseDeferred<void>&& promise) 243 200 { 244 201 ASSERT(!m_peerConnection.isClosed()); 245 246 if (!isRemoteDescriptionTypeValidForState(sessionDescription.type(), m_peerConnection.signalingState())) {247 promise.reject(InvalidStateError, makeString("Remote description type ", sessionDescription.type(), " is incompatible with current signaling state ", m_peerConnection.signalingState()));248 return;249 }250 202 251 203 m_setDescriptionPromise = WTF::makeUnique<DOMPromiseDeferred<void>>(WTFMove(promise)); -
trunk/Source/WebCore/platform/mediastream/RTCSignalingState.h
r281631 r281985 26 26 27 27 #if ENABLE(WEB_RTC) 28 29 #include <wtf/text/WTFString.h> 28 30 29 31 namespace WebCore { -
trunk/Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp
r281926 r281985 263 263 void MockLibWebRTCPeerConnection::SetLocalDescription(webrtc::SetSessionDescriptionObserver* observer, webrtc::SessionDescriptionInterface* sessionDescription) 264 264 { 265 bool isCorrectState = true; 266 switch (m_signalingState) { 267 case RTCSignalingState::Stable: 268 case RTCSignalingState::HaveLocalOffer: 269 isCorrectState = sessionDescription->GetType() == webrtc::SdpType::kOffer; 270 if (isCorrectState) 271 m_signalingState = RTCSignalingState::HaveLocalOffer; 272 break; 273 case RTCSignalingState::HaveRemoteOffer: 274 isCorrectState = sessionDescription->GetType() == webrtc::SdpType::kAnswer; 275 if (isCorrectState) 276 m_signalingState = RTCSignalingState::Stable; 277 break; 278 case RTCSignalingState::HaveLocalPranswer: 279 case RTCSignalingState::HaveRemotePranswer: 280 case RTCSignalingState::Closed: 281 isCorrectState = false; 282 } 283 if (!isCorrectState) { 284 LibWebRTCProvider::callOnWebRTCSignalingThread([observer] { 285 observer->OnFailure(webrtc::RTCError(webrtc::RTCErrorType::INVALID_STATE)); 286 }); 287 return; 288 } 289 265 290 std::unique_ptr<webrtc::SessionDescriptionInterface> toBeFreed(sessionDescription); 266 291 LibWebRTCProvider::callOnWebRTCSignalingThread([this, observer] { … … 272 297 void MockLibWebRTCPeerConnection::SetRemoteDescription(webrtc::SetSessionDescriptionObserver* observer, webrtc::SessionDescriptionInterface* sessionDescription) 273 298 { 299 bool isCorrectState = true; 300 switch (m_signalingState) { 301 case RTCSignalingState::HaveRemoteOffer: 302 case RTCSignalingState::Stable: 303 isCorrectState = sessionDescription->GetType() == webrtc::SdpType::kOffer; 304 if (isCorrectState) 305 m_signalingState = RTCSignalingState::HaveRemoteOffer; 306 break; 307 case RTCSignalingState::HaveLocalOffer: 308 isCorrectState = sessionDescription->GetType() == webrtc::SdpType::kAnswer; 309 if (isCorrectState) 310 m_signalingState = RTCSignalingState::Stable; 311 break; 312 case RTCSignalingState::HaveLocalPranswer: 313 case RTCSignalingState::HaveRemotePranswer: 314 case RTCSignalingState::Closed: 315 isCorrectState = false; 316 } 317 if (!isCorrectState) { 318 LibWebRTCProvider::callOnWebRTCSignalingThread([observer] { 319 observer->OnFailure(webrtc::RTCError(webrtc::RTCErrorType::INVALID_STATE)); 320 }); 321 return; 322 } 323 274 324 std::unique_ptr<webrtc::SessionDescriptionInterface> toBeFreed(sessionDescription); 275 325 LibWebRTCProvider::callOnWebRTCSignalingThread([observer] { -
trunk/Source/WebCore/testing/MockLibWebRTCPeerConnection.h
r281981 r281985 28 28 29 29 #include "LibWebRTCMacros.h" 30 #include "RTCSignalingState.h" 30 31 31 32 ALLOW_UNUSED_PARAMETERS_BEGIN … … 327 328 bool m_isReceivingVideo { false }; 328 329 std::string m_streamLabel; 330 RTCSignalingState m_signalingState { RTCSignalingState::Stable }; 329 331 }; 330 332
Note: See TracChangeset
for help on using the changeset viewer.