Skip to content

Commit 73df819

Browse files
committed
Add more descriptive messages to setLocalDescription/setRemoteDescription error cases
https://bugs.webkit.org/show_bug.cgi?id=220857 Reviewed by Eric Carlson. LayoutTests/imported/w3c: * web-platform-tests/webrtc/RTCPeerConnection-SLD-SRD-timing.https-expected.txt: * web-platform-tests/webrtc/RTCPeerConnection-operations.https-expected.txt: * web-platform-tests/webrtc/RTCPeerConnection-perfect-negotiation-stress-glare-linear.https-expected.txt: * web-platform-tests/webrtc/RTCPeerConnection-perfect-negotiation-stress-glare.https-expected.txt: * web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt: * web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-rollback-expected.txt: * web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-offer-expected.txt: * web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback-expected.txt: Source/WebCore: No change of behavior, covered by rebased tests. * Modules/mediastream/PeerConnectionBackend.cpp: (WebCore::PeerConnectionBackend::setLocalDescription): (WebCore::PeerConnectionBackend::setRemoteDescription): LayoutTests: * fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt: Canonical link: https://commits.webkit.org/233257@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent b1f82ba commit 73df819

13 files changed

Lines changed: 71 additions & 33 deletions

LayoutTests/ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2021-01-22 Youenn Fablet <youenn@apple.com>
2+
3+
Add more descriptive messages to setLocalDescription/setRemoteDescription error cases
4+
https://bugs.webkit.org/show_bug.cgi?id=220857
5+
6+
Reviewed by Eric Carlson.
7+
8+
* fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt:
9+
110
2021-01-22 Chris Dumez <cdumez@apple.com>
211

312
[ Big Sur ] imported/w3c/web-platform-tests/beacon/beacon-cors.sub.window.html is a flaky failure

LayoutTests/fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ PASS remoteOffer1 set as remote description (again)
2020
FAIL pc.signalingState should be have-remote-offer. Was stable.
2121

2222
*** Try setting local descriptions with bad types for the current state
23-
PASS promise pc.setRemoteDescription({type:'answer', sdp:remoteOffer1.sdp}); rejected with InvalidStateError: Description type incompatible with current signaling state
24-
PASS promise pc.setRemoteDescription({type:'pranswer', sdp:remoteOffer1.sdp}); rejected with InvalidStateError: Description type incompatible with current signaling state
23+
PASS promise pc.setRemoteDescription({type:'answer', sdp:remoteOffer1.sdp}); rejected with InvalidStateError: Remote description type 2 is incompatible with current signaling state 0
24+
PASS promise pc.setRemoteDescription({type:'pranswer', sdp:remoteOffer1.sdp}); rejected with InvalidStateError: Remote description type 1 is incompatible with current signaling state 0
2525

2626
*** Create (remote) offer with video (remoteOffer2)
2727
*** Done, start testing with remoteOffer2

LayoutTests/imported/w3c/ChangeLog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2021-01-22 Youenn Fablet <youenn@apple.com>
2+
3+
Add more descriptive messages to setLocalDescription/setRemoteDescription error cases
4+
https://bugs.webkit.org/show_bug.cgi?id=220857
5+
6+
Reviewed by Eric Carlson.
7+
8+
* web-platform-tests/webrtc/RTCPeerConnection-SLD-SRD-timing.https-expected.txt:
9+
* web-platform-tests/webrtc/RTCPeerConnection-operations.https-expected.txt:
10+
* web-platform-tests/webrtc/RTCPeerConnection-perfect-negotiation-stress-glare-linear.https-expected.txt:
11+
* web-platform-tests/webrtc/RTCPeerConnection-perfect-negotiation-stress-glare.https-expected.txt:
12+
* web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt:
13+
* web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-rollback-expected.txt:
14+
* web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-offer-expected.txt:
15+
* web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback-expected.txt:
16+
117
2021-01-22 Ziran Sun <zsun@igalia.com>
218

319
[css-grid] Relayout grid items when definiteness changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
FAIL setLocalDescription and setRemoteDescription are not racy promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state"
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"
33

LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-operations.https-expected.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ PASS pc.getStats does NOT use the operations chain
2626
PASS sender.getStats does NOT use the operations chain
2727
PASS receiver.getStats does NOT use the operations chain
2828
FAIL addIceCandidate chains onto SRD, fails before assert_equals: expected "InvalidStateError" but got "Error"
29-
FAIL Operations queue not vulnerable to recursion by chained negotiationneeded promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state"
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"
3030
FAIL Pack operations queue with implicit offer and answer promise_test: Unhandled rejection with value: object "OperationError: Expect line: v="
3131
TIMEOUT Negotiate solely by operations queue and signaling state Test timed out
3232

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

2-
FAIL Perfect negotiation stress glare linear Description type incompatible with current signaling state
3-
FAIL Perfect negotiation stress glare linear with roles reversed assert_unreached: Error in iframe: InvalidStateError: Description type incompatible with current signaling state Reached unreachable code
2+
FAIL Perfect negotiation stress glare linear Remote description type 0 is incompatible with current signaling state 1
3+
FAIL Perfect negotiation stress glare linear with roles reversed assert_unreached: Error in iframe: InvalidStateError: Remote description type 0 is incompatible with current signaling state 1 Reached unreachable code
44

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

2-
FAIL Perfect negotiation stress glare Description type incompatible with current signaling state
3-
FAIL Perfect negotiation stress glare with roles reversed assert_unreached: Error in iframe: InvalidStateError: Description type incompatible with current signaling state Reached unreachable code
2+
FAIL Perfect negotiation stress glare Remote description type 0 is incompatible with current signaling state 1
3+
FAIL Perfect negotiation stress glare with roles reversed assert_unreached: Error in iframe: InvalidStateError: Remote description type 0 is incompatible with current signaling state 1 Reached unreachable code
44

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
PASS setLocalDescription(offer) with m= section should assign mid to corresponding transceiver
33
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: Description type incompatible with current signaling state"
5-
FAIL setLocalDescription(rollback) should only unset transceiver mids associated with current round promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state"
6-
FAIL setRemoteDescription(rollback) should remove newly created transceiver from transceiver list promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state"
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"
77
PASS setRemoteDescription should set transceiver inactive if its corresponding m section is rejected
88

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
FAIL setLocalDescription(rollback) from have-local-offer state should reset back to stable state promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state"
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"
33
PASS setLocalDescription(rollback) from stable state should reject with InvalidStateError
44
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: Description type incompatible with current signaling state"
6-
FAIL setLocalDescription(rollback) should update internal state with a queued tassk, in the right order promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state"
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"
77

LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-offer-expected.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PASS setRemoteDescription with valid offer should succeed
55
PASS setRemoteDescription multiple times should succeed
66
PASS setRemoteDescription multiple times with different offer should succeed
77
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: Description type incompatible with current signaling state"
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"
99
TIMEOUT setRemoteDescription(offer) from have-local-offer fires signalingstatechange twice Test timed out
1010
NOTRUN setRemoteDescription(offer) in stable should update internal state with a queued task, in the right order
1111
NOTRUN setRemoteDescription(offer) in have-local-offer should update internal state with a queued task, in the right order

0 commit comments

Comments
 (0)