diff --git a/talk/app/webrtc/webrtcsession_unittest.cc b/talk/app/webrtc/webrtcsession_unittest.cc index 828d741d1..f253927e4 100644 --- a/talk/app/webrtc/webrtcsession_unittest.cc +++ b/talk/app/webrtc/webrtcsession_unittest.cc @@ -1131,7 +1131,7 @@ class WebRtcSessionTest : public testing::Test { loopback_network_manager.ApplyFirewallRules(fss_.get()); LOG(LS_INFO) << "Firewall Rules applied again"; - EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionFailed, + EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionDisconnected, observer_.ice_connection_state_, kIceCandidatesTimeout + port_timeout); } @@ -2857,9 +2857,9 @@ TEST_F(WebRtcSessionTest, TestInitiatorGIceInAnswer) { &sdp); SessionDescriptionInterface* answer_with_gice = CreateSessionDescription(JsepSessionDescription::kAnswer, sdp, NULL); - SetRemoteDescriptionWithoutError(answer_with_gice); - VerifyTransportType("audio", cricket::ICEPROTO_GOOGLE); - VerifyTransportType("video", cricket::ICEPROTO_GOOGLE); + // Default offer is ICEPROTO_RFC5245, so we expect responder with + // only gice to fail. + SetRemoteDescriptionAnswerExpectError(kPushDownTDFailed, answer_with_gice); } // This test verifies the ice protocol type at initiator of the call @@ -2876,28 +2876,6 @@ TEST_F(WebRtcSessionTest, TestInitiatorIceInAnswer) { VerifyTransportType("video", cricket::ICEPROTO_RFC5245); } -// This test verifies the ice protocol type at receiver side of the call if -// receiver decides to use google-ice. -TEST_F(WebRtcSessionTest, TestReceiverGIceInOffer) { - Init(); - mediastream_signaling_.SendAudioVideoStream1(); - SessionDescriptionInterface* offer = CreateOffer(); - SetRemoteDescriptionWithoutError(offer); - rtc::scoped_ptr answer( - CreateAnswer(NULL)); - std::string sdp; - EXPECT_TRUE(answer->ToString(&sdp)); - // Adding ice-options to the session level. - InjectAfter("t=0 0\r\n", - "a=ice-options:google-ice\r\n", - &sdp); - SessionDescriptionInterface* answer_with_gice = - CreateSessionDescription(JsepSessionDescription::kAnswer, sdp, NULL); - SetLocalDescriptionWithoutError(answer_with_gice); - VerifyTransportType("audio", cricket::ICEPROTO_GOOGLE); - VerifyTransportType("video", cricket::ICEPROTO_GOOGLE); -} - // This test verifies the ice protocol type at receiver side of the call if // receiver decides to use ice RFC 5245. TEST_F(WebRtcSessionTest, TestReceiverIceInOffer) { @@ -2911,39 +2889,6 @@ TEST_F(WebRtcSessionTest, TestReceiverIceInOffer) { VerifyTransportType("video", cricket::ICEPROTO_RFC5245); } -// This test verifies the session state when ICE RFC5245 in offer and -// ICE google-ice in answer. -TEST_F(WebRtcSessionTest, TestIceOfferGIceOnlyAnswer) { - Init(); - mediastream_signaling_.SendAudioVideoStream1(); - rtc::scoped_ptr offer(CreateOffer()); - - std::string offer_str; - offer->ToString(&offer_str); - // Disable google-ice - const std::string gice_option = "google-ice"; - const std::string xgoogle_xice = "xgoogle-xice"; - rtc::replace_substrs(gice_option.c_str(), gice_option.length(), - xgoogle_xice.c_str(), xgoogle_xice.length(), - &offer_str); - JsepSessionDescription *ice_only_offer = - new JsepSessionDescription(JsepSessionDescription::kOffer); - EXPECT_TRUE((ice_only_offer)->Initialize(offer_str, NULL)); - SetLocalDescriptionWithoutError(ice_only_offer); - std::string original_offer_sdp; - EXPECT_TRUE(offer->ToString(&original_offer_sdp)); - SessionDescriptionInterface* pranswer_with_gice = - CreateSessionDescription(JsepSessionDescription::kPrAnswer, - original_offer_sdp, NULL); - SetRemoteDescriptionPranswerExpectError(kPushDownTDFailed, - pranswer_with_gice); - SessionDescriptionInterface* answer_with_gice = - CreateSessionDescription(JsepSessionDescription::kAnswer, - original_offer_sdp, NULL); - SetRemoteDescriptionAnswerExpectError(kPushDownTDFailed, - answer_with_gice); -} - // Verifing local offer and remote answer have matching m-lines as per RFC 3264. TEST_F(WebRtcSessionTest, TestIncorrectMLinesInRemoteAnswer) { Init(); diff --git a/talk/app/webrtc/webrtcsessiondescriptionfactory.cc b/talk/app/webrtc/webrtcsessiondescriptionfactory.cc index a3edd7a98..dbec959d6 100644 --- a/talk/app/webrtc/webrtcsessiondescriptionfactory.cc +++ b/talk/app/webrtc/webrtcsessiondescriptionfactory.cc @@ -125,7 +125,7 @@ WebRtcSessionDescriptionFactory::WebRtcSessionDescriptionFactory( session_id_(session_id), data_channel_type_(dct), identity_request_state_(IDENTITY_NOT_NEEDED) { - transport_desc_factory_.set_protocol(cricket::ICEPROTO_HYBRID); + transport_desc_factory_.set_protocol(cricket::ICEPROTO_RFC5245); session_desc_factory_.set_add_legacy_streams(false); // SRTP-SDES is disabled if DTLS is on. SetSdesPolicy(dtls_enabled ? cricket::SEC_DISABLED : cricket::SEC_REQUIRED); diff --git a/webrtc/p2p/base/transportdescriptionfactory.cc b/webrtc/p2p/base/transportdescriptionfactory.cc index 619c9d160..1230ba52c 100644 --- a/webrtc/p2p/base/transportdescriptionfactory.cc +++ b/webrtc/p2p/base/transportdescriptionfactory.cc @@ -19,7 +19,7 @@ namespace cricket { -static TransportProtocol kDefaultProtocol = ICEPROTO_GOOGLE; +static TransportProtocol kDefaultProtocol = ICEPROTO_RFC5245; TransportDescriptionFactory::TransportDescriptionFactory() : protocol_(kDefaultProtocol),