Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: talk/app/webrtc/webrtcsession_unittest.cc

Issue 1336553003: Revert change which removes GICE (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #define MAYBE_SKIP_TEST(feature) \ 64 #define MAYBE_SKIP_TEST(feature) \
65 if (!(feature())) { \ 65 if (!(feature())) { \
66 LOG(LS_INFO) << "Feature disabled... skipping"; \ 66 LOG(LS_INFO) << "Feature disabled... skipping"; \
67 return; \ 67 return; \
68 } 68 }
69 69
70 using cricket::BaseSession; 70 using cricket::BaseSession;
71 using cricket::DF_PLAY; 71 using cricket::DF_PLAY;
72 using cricket::DF_SEND; 72 using cricket::DF_SEND;
73 using cricket::FakeVoiceMediaChannel; 73 using cricket::FakeVoiceMediaChannel;
74 using cricket::NS_GINGLE_P2P;
75 using cricket::NS_JINGLE_ICE_UDP;
74 using cricket::TransportInfo; 76 using cricket::TransportInfo;
75 using rtc::SocketAddress; 77 using rtc::SocketAddress;
76 using rtc::scoped_ptr; 78 using rtc::scoped_ptr;
77 using rtc::Thread; 79 using rtc::Thread;
78 using webrtc::CreateSessionDescription; 80 using webrtc::CreateSessionDescription;
79 using webrtc::CreateSessionDescriptionObserver; 81 using webrtc::CreateSessionDescriptionObserver;
80 using webrtc::CreateSessionDescriptionRequest; 82 using webrtc::CreateSessionDescriptionRequest;
81 using webrtc::DtlsIdentityStoreInterface; 83 using webrtc::DtlsIdentityStoreInterface;
82 using webrtc::FakeConstraints; 84 using webrtc::FakeConstraints;
83 using webrtc::FakeMetricsObserver; 85 using webrtc::FakeMetricsObserver;
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 vss_(new rtc::VirtualSocketServer(pss_.get())), 333 vss_(new rtc::VirtualSocketServer(pss_.get())),
332 fss_(new rtc::FirewallSocketServer(vss_.get())), 334 fss_(new rtc::FirewallSocketServer(vss_.get())),
333 ss_scope_(fss_.get()), 335 ss_scope_(fss_.get()),
334 stun_socket_addr_(rtc::SocketAddress(kStunAddrHost, 336 stun_socket_addr_(rtc::SocketAddress(kStunAddrHost,
335 cricket::STUN_SERVER_PORT)), 337 cricket::STUN_SERVER_PORT)),
336 stun_server_(cricket::TestStunServer::Create(Thread::Current(), 338 stun_server_(cricket::TestStunServer::Create(Thread::Current(),
337 stun_socket_addr_)), 339 stun_socket_addr_)),
338 turn_server_(Thread::Current(), kTurnUdpIntAddr, kTurnUdpExtAddr), 340 turn_server_(Thread::Current(), kTurnUdpIntAddr, kTurnUdpExtAddr),
339 mediastream_signaling_(channel_manager_.get()), 341 mediastream_signaling_(channel_manager_.get()),
340 metrics_observer_(new rtc::RefCountedObject<FakeMetricsObserver>()) { 342 metrics_observer_(new rtc::RefCountedObject<FakeMetricsObserver>()) {
343 tdesc_factory_->set_protocol(cricket::ICEPROTO_HYBRID);
344
341 cricket::ServerAddresses stun_servers; 345 cricket::ServerAddresses stun_servers;
342 stun_servers.insert(stun_socket_addr_); 346 stun_servers.insert(stun_socket_addr_);
343 allocator_.reset(new cricket::BasicPortAllocator( 347 allocator_.reset(new cricket::BasicPortAllocator(
344 &network_manager_, 348 &network_manager_,
345 stun_servers, 349 stun_servers,
346 SocketAddress(), SocketAddress(), SocketAddress())); 350 SocketAddress(), SocketAddress(), SocketAddress()));
347 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | 351 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
348 cricket::PORTALLOCATOR_DISABLE_RELAY); 352 cricket::PORTALLOCATOR_DISABLE_RELAY |
353 cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG);
349 EXPECT_TRUE(channel_manager_->Init()); 354 EXPECT_TRUE(channel_manager_->Init());
350 desc_factory_->set_add_legacy_streams(false); 355 desc_factory_->set_add_legacy_streams(false);
351 allocator_->set_step_delay(cricket::kMinimumStepDelay); 356 allocator_->set_step_delay(cricket::kMinimumStepDelay);
352 } 357 }
353 358
354 void AddInterface(const SocketAddress& addr) { 359 void AddInterface(const SocketAddress& addr) {
355 network_manager_.AddInterface(addr); 360 network_manager_.AddInterface(addr);
356 } 361 }
357 362
358 // If |dtls_identity_store| != null or |rtc_configuration| contains 363 // If |dtls_identity_store| != null or |rtc_configuration| contains
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionDisconnected, 1174 EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionDisconnected,
1170 observer_.ice_connection_state_, 1175 observer_.ice_connection_state_,
1171 kIceCandidatesTimeout + port_timeout); 1176 kIceCandidatesTimeout + port_timeout);
1172 } 1177 }
1173 1178
1174 void TestLoopbackCall() { 1179 void TestLoopbackCall() {
1175 LoopbackNetworkConfiguration config; 1180 LoopbackNetworkConfiguration config;
1176 TestLoopbackCall(config); 1181 TestLoopbackCall(config);
1177 } 1182 }
1178 1183
1184 void VerifyTransportType(const std::string& content_name,
1185 cricket::TransportProtocol protocol) {
1186 const cricket::Transport* transport = session_->GetTransport(content_name);
1187 ASSERT_TRUE(transport != NULL);
1188 EXPECT_EQ(protocol, transport->protocol());
1189 }
1190
1179 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory. 1191 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory.
1180 void AddCNCodecs() { 1192 void AddCNCodecs() {
1181 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1, 0); 1193 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1, 0);
1182 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1, 0); 1194 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1, 0);
1183 1195
1184 // Add kCNCodec for dtmf test. 1196 // Add kCNCodec for dtmf test.
1185 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();; 1197 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();;
1186 codecs.push_back(kCNCodec1); 1198 codecs.push_back(kCNCodec1);
1187 codecs.push_back(kCNCodec2); 1199 codecs.push_back(kCNCodec2);
1188 media_engine_->SetAudioCodecs(codecs); 1200 media_engine_->SetAudioCodecs(codecs);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 } 1275 }
1264 1276
1265 void ConfigureAllocatorWithTurn() { 1277 void ConfigureAllocatorWithTurn() {
1266 cricket::RelayServerConfig relay_server(cricket::RELAY_TURN); 1278 cricket::RelayServerConfig relay_server(cricket::RELAY_TURN);
1267 cricket::RelayCredentials credentials(kTurnUsername, kTurnPassword); 1279 cricket::RelayCredentials credentials(kTurnUsername, kTurnPassword);
1268 relay_server.credentials = credentials; 1280 relay_server.credentials = credentials;
1269 relay_server.ports.push_back(cricket::ProtocolAddress( 1281 relay_server.ports.push_back(cricket::ProtocolAddress(
1270 kTurnUdpIntAddr, cricket::PROTO_UDP, false)); 1282 kTurnUdpIntAddr, cricket::PROTO_UDP, false));
1271 allocator_->AddRelay(relay_server); 1283 allocator_->AddRelay(relay_server);
1272 allocator_->set_step_delay(cricket::kMinimumStepDelay); 1284 allocator_->set_step_delay(cricket::kMinimumStepDelay);
1273 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP); 1285 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
1286 cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG);
1274 } 1287 }
1275 1288
1276 cricket::FakeMediaEngine* media_engine_; 1289 cricket::FakeMediaEngine* media_engine_;
1277 cricket::FakeDataEngine* data_engine_; 1290 cricket::FakeDataEngine* data_engine_;
1278 cricket::FakeDeviceManager* device_manager_; 1291 cricket::FakeDeviceManager* device_manager_;
1279 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; 1292 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
1280 rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_; 1293 rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_;
1281 rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_; 1294 rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_;
1282 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_; 1295 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_;
1283 rtc::scoped_ptr<rtc::VirtualSocketServer> vss_; 1296 rtc::scoped_ptr<rtc::VirtualSocketServer> vss_;
(...skipping 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after
2568 RemoveIceUfragPwdLines(offer.get(), &sdp); 2581 RemoveIceUfragPwdLines(offer.get(), &sdp);
2569 SessionDescriptionInterface* modified_offer = 2582 SessionDescriptionInterface* modified_offer =
2570 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2583 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2571 SetRemoteDescriptionOfferExpectError(kSdpWithoutIceUfragPwd, modified_offer); 2584 SetRemoteDescriptionOfferExpectError(kSdpWithoutIceUfragPwd, modified_offer);
2572 } 2585 }
2573 2586
2574 // This test verifies that setLocalDescription fails if local offer has 2587 // This test verifies that setLocalDescription fails if local offer has
2575 // too short ice ufrag and pwd strings. 2588 // too short ice ufrag and pwd strings.
2576 TEST_F(WebRtcSessionTest, TestSetLocalDescriptionInvalidIceCredentials) { 2589 TEST_F(WebRtcSessionTest, TestSetLocalDescriptionInvalidIceCredentials) {
2577 Init(); 2590 Init();
2591 tdesc_factory_->set_protocol(cricket::ICEPROTO_RFC5245);
2578 mediastream_signaling_.SendAudioVideoStream1(); 2592 mediastream_signaling_.SendAudioVideoStream1();
2579 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer()); 2593 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer());
2580 2594
2581 std::string sdp; 2595 std::string sdp;
2582 // Modifying ice ufrag and pwd in local offer with strings smaller than the 2596 // Modifying ice ufrag and pwd in local offer with strings smaller than the
2583 // recommended values of 4 and 22 bytes respectively. 2597 // recommended values of 4 and 22 bytes respectively.
2584 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp); 2598 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp);
2585 SessionDescriptionInterface* modified_offer = 2599 SessionDescriptionInterface* modified_offer =
2586 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2600 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2587 std::string error; 2601 std::string error;
2588 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error)); 2602 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error));
2589 2603
2590 // Test with string greater than 256. 2604 // Test with string greater than 256.
2591 sdp.clear(); 2605 sdp.clear();
2592 ModifyIceUfragPwdLines(offer.get(), kTooLongIceUfragPwd, kTooLongIceUfragPwd, 2606 ModifyIceUfragPwdLines(offer.get(), kTooLongIceUfragPwd, kTooLongIceUfragPwd,
2593 &sdp); 2607 &sdp);
2594 modified_offer = CreateSessionDescription(JsepSessionDescription::kOffer, sdp, 2608 modified_offer = CreateSessionDescription(JsepSessionDescription::kOffer, sdp,
2595 NULL); 2609 NULL);
2596 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error)); 2610 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error));
2597 } 2611 }
2598 2612
2599 // This test verifies that setRemoteDescription fails if remote offer has 2613 // This test verifies that setRemoteDescription fails if remote offer has
2600 // too short ice ufrag and pwd strings. 2614 // too short ice ufrag and pwd strings.
2601 TEST_F(WebRtcSessionTest, TestSetRemoteDescriptionInvalidIceCredentials) { 2615 TEST_F(WebRtcSessionTest, TestSetRemoteDescriptionInvalidIceCredentials) {
2602 Init(); 2616 Init();
2617 tdesc_factory_->set_protocol(cricket::ICEPROTO_RFC5245);
2603 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer()); 2618 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer());
2604 std::string sdp; 2619 std::string sdp;
2605 // Modifying ice ufrag and pwd in remote offer with strings smaller than the 2620 // Modifying ice ufrag and pwd in remote offer with strings smaller than the
2606 // recommended values of 4 and 22 bytes respectively. 2621 // recommended values of 4 and 22 bytes respectively.
2607 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp); 2622 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp);
2608 SessionDescriptionInterface* modified_offer = 2623 SessionDescriptionInterface* modified_offer =
2609 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2624 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2610 std::string error; 2625 std::string error;
2611 EXPECT_FALSE(session_->SetRemoteDescription(modified_offer, &error)); 2626 EXPECT_FALSE(session_->SetRemoteDescription(modified_offer, &error));
2612 2627
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
3166 EXPECT_FALSE(session_->initiator()); 3181 EXPECT_FALSE(session_->initiator());
3167 SessionDescriptionInterface* offer = CreateRemoteOffer(); 3182 SessionDescriptionInterface* offer = CreateRemoteOffer();
3168 SetRemoteDescriptionWithoutError(offer); 3183 SetRemoteDescriptionWithoutError(offer);
3169 SessionDescriptionInterface* answer = CreateAnswer(NULL); 3184 SessionDescriptionInterface* answer = CreateAnswer(NULL);
3170 3185
3171 EXPECT_FALSE(session_->initiator()); 3186 EXPECT_FALSE(session_->initiator());
3172 SetLocalDescriptionWithoutError(answer); 3187 SetLocalDescriptionWithoutError(answer);
3173 EXPECT_FALSE(session_->initiator()); 3188 EXPECT_FALSE(session_->initiator());
3174 } 3189 }
3175 3190
3191 // This test verifies the ice protocol type at initiator of the call
3192 // if |a=ice-options:google-ice| is present in answer.
3193 TEST_F(WebRtcSessionTest, TestInitiatorGIceInAnswer) {
3194 Init();
3195 mediastream_signaling_.SendAudioVideoStream1();
3196 SessionDescriptionInterface* offer = CreateOffer();
3197 rtc::scoped_ptr<SessionDescriptionInterface> answer(
3198 CreateRemoteAnswer(offer));
3199 SetLocalDescriptionWithoutError(offer);
3200 std::string sdp;
3201 EXPECT_TRUE(answer->ToString(&sdp));
3202 // Adding ice-options to the session level.
3203 InjectAfter("t=0 0\r\n",
3204 "a=ice-options:google-ice\r\n",
3205 &sdp);
3206 SessionDescriptionInterface* answer_with_gice =
3207 CreateSessionDescription(JsepSessionDescription::kAnswer, sdp, NULL);
3208 // Default offer is ICEPROTO_RFC5245, so we expect responder with
3209 // only gice to fail.
3210 SetRemoteDescriptionAnswerExpectError(kPushDownTDFailed, answer_with_gice);
3211 }
3212
3213 // This test verifies the ice protocol type at initiator of the call
3214 // if ICE RFC5245 is supported in answer.
3215 TEST_F(WebRtcSessionTest, TestInitiatorIceInAnswer) {
3216 Init();
3217 mediastream_signaling_.SendAudioVideoStream1();
3218 SessionDescriptionInterface* offer = CreateOffer();
3219 SessionDescriptionInterface* answer = CreateRemoteAnswer(offer);
3220 SetLocalDescriptionWithoutError(offer);
3221
3222 SetRemoteDescriptionWithoutError(answer);
3223 VerifyTransportType("audio", cricket::ICEPROTO_RFC5245);
3224 VerifyTransportType("video", cricket::ICEPROTO_RFC5245);
3225 }
3226
3227 // This test verifies the ice protocol type at receiver side of the call if
3228 // receiver decides to use ice RFC 5245.
3229 TEST_F(WebRtcSessionTest, TestReceiverIceInOffer) {
3230 Init();
3231 mediastream_signaling_.SendAudioVideoStream1();
3232 SessionDescriptionInterface* offer = CreateOffer();
3233 SetRemoteDescriptionWithoutError(offer);
3234 SessionDescriptionInterface* answer = CreateAnswer(NULL);
3235 SetLocalDescriptionWithoutError(answer);
3236 VerifyTransportType("audio", cricket::ICEPROTO_RFC5245);
3237 VerifyTransportType("video", cricket::ICEPROTO_RFC5245);
3238 }
3239
3176 // Verifing local offer and remote answer have matching m-lines as per RFC 3264. 3240 // Verifing local offer and remote answer have matching m-lines as per RFC 3264.
3177 TEST_F(WebRtcSessionTest, TestIncorrectMLinesInRemoteAnswer) { 3241 TEST_F(WebRtcSessionTest, TestIncorrectMLinesInRemoteAnswer) {
3178 Init(); 3242 Init();
3179 mediastream_signaling_.SendAudioVideoStream1(); 3243 mediastream_signaling_.SendAudioVideoStream1();
3180 SessionDescriptionInterface* offer = CreateOffer(); 3244 SessionDescriptionInterface* offer = CreateOffer();
3181 SetLocalDescriptionWithoutError(offer); 3245 SetLocalDescriptionWithoutError(offer);
3182 rtc::scoped_ptr<SessionDescriptionInterface> answer( 3246 rtc::scoped_ptr<SessionDescriptionInterface> answer(
3183 CreateRemoteAnswer(session_->local_description())); 3247 CreateRemoteAnswer(session_->local_description()));
3184 3248
3185 cricket::SessionDescription* answer_copy = answer->description()->Copy(); 3249 cricket::SessionDescription* answer_copy = answer->description()->Copy();
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
3386 3450
3387 mediastream_signaling_.SendAudioVideoStream2(); 3451 mediastream_signaling_.SendAudioVideoStream2();
3388 SessionDescriptionInterface* answer = 3452 SessionDescriptionInterface* answer =
3389 CreateRemoteAnswer(session_->local_description()); 3453 CreateRemoteAnswer(session_->local_description());
3390 SetRemoteDescriptionAnswerExpectError("ERROR_CONTENT", answer); 3454 SetRemoteDescriptionAnswerExpectError("ERROR_CONTENT", answer);
3391 } 3455 }
3392 3456
3393 // Runs the loopback call test with BUNDLE and STUN disabled. 3457 // Runs the loopback call test with BUNDLE and STUN disabled.
3394 TEST_F(WebRtcSessionTest, TestIceStatesBasic) { 3458 TEST_F(WebRtcSessionTest, TestIceStatesBasic) {
3395 // Lets try with only UDP ports. 3459 // Lets try with only UDP ports.
3396 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | 3460 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG |
3461 cricket::PORTALLOCATOR_DISABLE_TCP |
3397 cricket::PORTALLOCATOR_DISABLE_STUN | 3462 cricket::PORTALLOCATOR_DISABLE_STUN |
3398 cricket::PORTALLOCATOR_DISABLE_RELAY); 3463 cricket::PORTALLOCATOR_DISABLE_RELAY);
3399 TestLoopbackCall(); 3464 TestLoopbackCall();
3400 } 3465 }
3401 3466
3402 TEST_F(WebRtcSessionTest, TestIceStatesBasicIPv6) { 3467 TEST_F(WebRtcSessionTest, TestIceStatesBasicIPv6) {
3403 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | 3468 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG |
3469 cricket::PORTALLOCATOR_DISABLE_TCP |
3404 cricket::PORTALLOCATOR_DISABLE_STUN | 3470 cricket::PORTALLOCATOR_DISABLE_STUN |
3405 cricket::PORTALLOCATOR_ENABLE_IPV6 | 3471 cricket::PORTALLOCATOR_ENABLE_IPV6 |
3406 cricket::PORTALLOCATOR_DISABLE_RELAY); 3472 cricket::PORTALLOCATOR_DISABLE_RELAY);
3407 3473
3408 // best connection is IPv6 since it has higher network preference. 3474 // best connection is IPv6 since it has higher network preference.
3409 LoopbackNetworkConfiguration config; 3475 LoopbackNetworkConfiguration config;
3410 config.test_ipv6_network_ = true; 3476 config.test_ipv6_network_ = true;
3411 config.best_connection_after_initial_ice_converged_ = 3477 config.best_connection_after_initial_ice_converged_ =
3412 LoopbackNetworkConfiguration::ExpectedBestConnection(0, 1); 3478 LoopbackNetworkConfiguration::ExpectedBestConnection(0, 1);
3413 3479
3414 TestLoopbackCall(config); 3480 TestLoopbackCall(config);
3415 } 3481 }
3416 3482
3417 // Runs the loopback call test with BUNDLE and STUN enabled. 3483 // Runs the loopback call test with BUNDLE and STUN enabled.
3418 TEST_F(WebRtcSessionTest, TestIceStatesBundle) { 3484 TEST_F(WebRtcSessionTest, TestIceStatesBundle) {
3419 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | 3485 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG |
3420 cricket::PORTALLOCATOR_DISABLE_RELAY); 3486 cricket::PORTALLOCATOR_DISABLE_TCP |
3487 cricket::PORTALLOCATOR_DISABLE_RELAY);
3421 TestLoopbackCall(); 3488 TestLoopbackCall();
3422 } 3489 }
3423 3490
3424 TEST_F(WebRtcSessionTest, SetSdpFailedOnSessionError) { 3491 TEST_F(WebRtcSessionTest, SetSdpFailedOnSessionError) {
3425 Init(); 3492 Init();
3426 cricket::MediaSessionOptions options; 3493 cricket::MediaSessionOptions options;
3427 options.recv_video = true; 3494 options.recv_video = true;
3428 3495
3429 cricket::BaseSession::Error error_code = cricket::BaseSession::ERROR_CONTENT; 3496 cricket::BaseSession::Error error_code = cricket::BaseSession::ERROR_CONTENT;
3430 std::string error_code_str = "ERROR_CONTENT"; 3497 std::string error_code_str = "ERROR_CONTENT";
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
3937 } 4004 }
3938 } 4005 }
3939 4006
3940 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 4007 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
3941 // currently fails because upon disconnection and reconnection OnIceComplete is 4008 // currently fails because upon disconnection and reconnection OnIceComplete is
3942 // called more than once without returning to IceGatheringGathering. 4009 // called more than once without returning to IceGatheringGathering.
3943 4010
3944 INSTANTIATE_TEST_CASE_P( 4011 INSTANTIATE_TEST_CASE_P(
3945 WebRtcSessionTests, WebRtcSessionTest, 4012 WebRtcSessionTests, WebRtcSessionTest,
3946 testing::Values(ALREADY_GENERATED, DTLS_IDENTITY_STORE)); 4013 testing::Values(ALREADY_GENERATED, DTLS_IDENTITY_STORE));
OLDNEW
« no previous file with comments | « talk/app/webrtc/webrtcsdp_unittest.cc ('k') | talk/app/webrtc/webrtcsessiondescriptionfactory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698