diff --git a/dom/media/tests/mochitest/test_peerConnection_setLocalAnswerInHaveLocalOffer.html b/dom/media/tests/mochitest/test_peerConnection_setLocalAnswerInHaveLocalOffer.html index ab5ff099e6ef..191e664b27bb 100644 --- a/dom/media/tests/mochitest/test_peerConnection_setLocalAnswerInHaveLocalOffer.html +++ b/dom/media/tests/mochitest/test_peerConnection_setLocalAnswerInHaveLocalOffer.html @@ -21,7 +21,7 @@ runNetworkTest(function () { test.pcLocal._latest_offer.type = "answer"; return test.pcLocal.setLocalDescriptionAndFail(test.pcLocal._latest_offer) .then(err => { - is(err.name, "InvalidStateError", "Error is InvalidStateError"); + is(err.name, "InvalidModificationError", "Error is InvalidModificationError"); }); } ]); diff --git a/dom/media/tests/mochitest/test_peerConnection_setLocalAnswerInStable.html b/dom/media/tests/mochitest/test_peerConnection_setLocalAnswerInStable.html index 35e0654d18c1..a3f37ecc64fb 100644 --- a/dom/media/tests/mochitest/test_peerConnection_setLocalAnswerInStable.html +++ b/dom/media/tests/mochitest/test_peerConnection_setLocalAnswerInStable.html @@ -21,7 +21,7 @@ runNetworkTest(function () { test.pcLocal._latest_offer.type = "answer"; return test.pcLocal.setLocalDescriptionAndFail(test.pcLocal._latest_offer) .then(err => { - is(err.name, "InvalidStateError", "Error is InvalidStateError"); + is(err.name, "InvalidModificationError", "Error is InvalidModificationError"); }); } ]); diff --git a/media/webrtc/signaling/gtest/jsep_session_unittest.cpp b/media/webrtc/signaling/gtest/jsep_session_unittest.cpp index ad964222ef28..27256406786a 100644 --- a/media/webrtc/signaling/gtest/jsep_session_unittest.cpp +++ b/media/webrtc/signaling/gtest/jsep_session_unittest.cpp @@ -5288,7 +5288,7 @@ TEST_F(JsepSessionTest, SetLocalAnswerInHaveLocalOffer) { // SetLocalDescription call fails. JsepSession::Result result = mSessionOff->SetLocalDescription(kJsepSdpAnswer, offer); - ASSERT_EQ(dom::PCError::InvalidStateError, *result.mError); + ASSERT_EQ(dom::PCError::InvalidModificationError, *result.mError); ASSERT_EQ(kJsepStateHaveLocalOffer, mSessionOff->GetState()); } @@ -5320,7 +5320,7 @@ TEST_F(JsepSessionTest, SetLocalOfferInHaveRemoteOffer) { // SetLocalDescription call fails. JsepSession::Result result = mSessionAns->SetLocalDescription(kJsepSdpOffer, offer); - ASSERT_EQ(dom::PCError::InvalidStateError, *result.mError); + ASSERT_EQ(dom::PCError::InvalidModificationError, *result.mError); ASSERT_EQ(kJsepStateHaveRemoteOffer, mSessionAns->GetState()); } diff --git a/testing/web-platform/tests/webrtc/RTCPeerConnection-setLocalDescription-answer.html b/testing/web-platform/tests/webrtc/RTCPeerConnection-setLocalDescription-answer.html index e8b3ef5071e4..c97021b0fabb 100644 --- a/testing/web-platform/tests/webrtc/RTCPeerConnection-setLocalDescription-answer.html +++ b/testing/web-platform/tests/webrtc/RTCPeerConnection-setLocalDescription-answer.html @@ -153,9 +153,9 @@ return pc.createOffer() .then(offer => - promise_rejects(t, 'InvalidStateError', + promise_rejects(t, 'InvalidModificationError', pc.setLocalDescription({ type: 'answer', sdp: offer.sdp }))); - }, 'Calling setLocalDescription(answer) from stable state should reject with InvalidStateError'); + }, 'Calling setLocalDescription(answer) from stable state should reject with InvalidModificationError'); promise_test(t => { const pc = new RTCPeerConnection(); @@ -167,9 +167,9 @@ pc.setLocalDescription(offer) .then(() => generateAnswer(offer))) .then(answer => - promise_rejects(t, 'InvalidStateError', + promise_rejects(t, 'InvalidModificationError', pc.setLocalDescription(answer))); - }, 'Calling setLocalDescription(answer) from have-local-offer state should reject with InvalidStateError'); + }, 'Calling setLocalDescription(answer) from have-local-offer state should reject with InvalidModificationError'); promise_test(async t => { const pc1 = new RTCPeerConnection();