Change default from GICE to ICE5245 for SDP offers
BUG=4299 R=juberti@webrtc.org Review URL: https://webrtc-codereview.appspot.com/34289004 Cr-Commit-Position: refs/heads/master@{#8440} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8440 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
d3d3baaa8e
commit
804eb46806
@ -1131,7 +1131,7 @@ class WebRtcSessionTest : public testing::Test {
|
|||||||
|
|
||||||
loopback_network_manager.ApplyFirewallRules(fss_.get());
|
loopback_network_manager.ApplyFirewallRules(fss_.get());
|
||||||
LOG(LS_INFO) << "Firewall Rules applied again";
|
LOG(LS_INFO) << "Firewall Rules applied again";
|
||||||
EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionFailed,
|
EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionDisconnected,
|
||||||
observer_.ice_connection_state_,
|
observer_.ice_connection_state_,
|
||||||
kIceCandidatesTimeout + port_timeout);
|
kIceCandidatesTimeout + port_timeout);
|
||||||
}
|
}
|
||||||
@ -2857,9 +2857,9 @@ TEST_F(WebRtcSessionTest, TestInitiatorGIceInAnswer) {
|
|||||||
&sdp);
|
&sdp);
|
||||||
SessionDescriptionInterface* answer_with_gice =
|
SessionDescriptionInterface* answer_with_gice =
|
||||||
CreateSessionDescription(JsepSessionDescription::kAnswer, sdp, NULL);
|
CreateSessionDescription(JsepSessionDescription::kAnswer, sdp, NULL);
|
||||||
SetRemoteDescriptionWithoutError(answer_with_gice);
|
// Default offer is ICEPROTO_RFC5245, so we expect responder with
|
||||||
VerifyTransportType("audio", cricket::ICEPROTO_GOOGLE);
|
// only gice to fail.
|
||||||
VerifyTransportType("video", cricket::ICEPROTO_GOOGLE);
|
SetRemoteDescriptionAnswerExpectError(kPushDownTDFailed, answer_with_gice);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This test verifies the ice protocol type at initiator of the call
|
// 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);
|
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<SessionDescriptionInterface> 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
|
// This test verifies the ice protocol type at receiver side of the call if
|
||||||
// receiver decides to use ice RFC 5245.
|
// receiver decides to use ice RFC 5245.
|
||||||
TEST_F(WebRtcSessionTest, TestReceiverIceInOffer) {
|
TEST_F(WebRtcSessionTest, TestReceiverIceInOffer) {
|
||||||
@ -2911,39 +2889,6 @@ TEST_F(WebRtcSessionTest, TestReceiverIceInOffer) {
|
|||||||
VerifyTransportType("video", cricket::ICEPROTO_RFC5245);
|
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<SessionDescriptionInterface> 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.
|
// Verifing local offer and remote answer have matching m-lines as per RFC 3264.
|
||||||
TEST_F(WebRtcSessionTest, TestIncorrectMLinesInRemoteAnswer) {
|
TEST_F(WebRtcSessionTest, TestIncorrectMLinesInRemoteAnswer) {
|
||||||
Init();
|
Init();
|
||||||
|
@ -125,7 +125,7 @@ WebRtcSessionDescriptionFactory::WebRtcSessionDescriptionFactory(
|
|||||||
session_id_(session_id),
|
session_id_(session_id),
|
||||||
data_channel_type_(dct),
|
data_channel_type_(dct),
|
||||||
identity_request_state_(IDENTITY_NOT_NEEDED) {
|
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);
|
session_desc_factory_.set_add_legacy_streams(false);
|
||||||
// SRTP-SDES is disabled if DTLS is on.
|
// SRTP-SDES is disabled if DTLS is on.
|
||||||
SetSdesPolicy(dtls_enabled ? cricket::SEC_DISABLED : cricket::SEC_REQUIRED);
|
SetSdesPolicy(dtls_enabled ? cricket::SEC_DISABLED : cricket::SEC_REQUIRED);
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
namespace cricket {
|
namespace cricket {
|
||||||
|
|
||||||
static TransportProtocol kDefaultProtocol = ICEPROTO_GOOGLE;
|
static TransportProtocol kDefaultProtocol = ICEPROTO_RFC5245;
|
||||||
|
|
||||||
TransportDescriptionFactory::TransportDescriptionFactory()
|
TransportDescriptionFactory::TransportDescriptionFactory()
|
||||||
: protocol_(kDefaultProtocol),
|
: protocol_(kDefaultProtocol),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user