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

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

Issue 1353713002: Remove GICE (again). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Undo .gclient 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;
76 using cricket::TransportInfo; 74 using cricket::TransportInfo;
77 using rtc::SocketAddress; 75 using rtc::SocketAddress;
78 using rtc::scoped_ptr; 76 using rtc::scoped_ptr;
79 using rtc::Thread; 77 using rtc::Thread;
80 using webrtc::CreateSessionDescription; 78 using webrtc::CreateSessionDescription;
81 using webrtc::CreateSessionDescriptionObserver; 79 using webrtc::CreateSessionDescriptionObserver;
82 using webrtc::CreateSessionDescriptionRequest; 80 using webrtc::CreateSessionDescriptionRequest;
83 using webrtc::DtlsIdentityStoreInterface; 81 using webrtc::DtlsIdentityStoreInterface;
84 using webrtc::FakeConstraints; 82 using webrtc::FakeConstraints;
85 using webrtc::FakeMetricsObserver; 83 using webrtc::FakeMetricsObserver;
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 vss_(new rtc::VirtualSocketServer(pss_.get())), 331 vss_(new rtc::VirtualSocketServer(pss_.get())),
334 fss_(new rtc::FirewallSocketServer(vss_.get())), 332 fss_(new rtc::FirewallSocketServer(vss_.get())),
335 ss_scope_(fss_.get()), 333 ss_scope_(fss_.get()),
336 stun_socket_addr_(rtc::SocketAddress(kStunAddrHost, 334 stun_socket_addr_(rtc::SocketAddress(kStunAddrHost,
337 cricket::STUN_SERVER_PORT)), 335 cricket::STUN_SERVER_PORT)),
338 stun_server_(cricket::TestStunServer::Create(Thread::Current(), 336 stun_server_(cricket::TestStunServer::Create(Thread::Current(),
339 stun_socket_addr_)), 337 stun_socket_addr_)),
340 turn_server_(Thread::Current(), kTurnUdpIntAddr, kTurnUdpExtAddr), 338 turn_server_(Thread::Current(), kTurnUdpIntAddr, kTurnUdpExtAddr),
341 mediastream_signaling_(channel_manager_.get()), 339 mediastream_signaling_(channel_manager_.get()),
342 metrics_observer_(new rtc::RefCountedObject<FakeMetricsObserver>()) { 340 metrics_observer_(new rtc::RefCountedObject<FakeMetricsObserver>()) {
343 tdesc_factory_->set_protocol(cricket::ICEPROTO_HYBRID);
344
345 cricket::ServerAddresses stun_servers; 341 cricket::ServerAddresses stun_servers;
346 stun_servers.insert(stun_socket_addr_); 342 stun_servers.insert(stun_socket_addr_);
347 allocator_.reset(new cricket::BasicPortAllocator( 343 allocator_.reset(new cricket::BasicPortAllocator(
348 &network_manager_, 344 &network_manager_,
349 stun_servers, 345 stun_servers,
350 SocketAddress(), SocketAddress(), SocketAddress())); 346 SocketAddress(), SocketAddress(), SocketAddress()));
351 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | 347 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
352 cricket::PORTALLOCATOR_DISABLE_RELAY | 348 cricket::PORTALLOCATOR_DISABLE_RELAY);
353 cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG);
354 EXPECT_TRUE(channel_manager_->Init()); 349 EXPECT_TRUE(channel_manager_->Init());
355 desc_factory_->set_add_legacy_streams(false); 350 desc_factory_->set_add_legacy_streams(false);
356 allocator_->set_step_delay(cricket::kMinimumStepDelay); 351 allocator_->set_step_delay(cricket::kMinimumStepDelay);
357 } 352 }
358 353
359 void AddInterface(const SocketAddress& addr) { 354 void AddInterface(const SocketAddress& addr) {
360 network_manager_.AddInterface(addr); 355 network_manager_.AddInterface(addr);
361 } 356 }
362 357
363 // If |dtls_identity_store| != null or |rtc_configuration| contains 358 // If |dtls_identity_store| != null or |rtc_configuration| contains
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionDisconnected, 1169 EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionDisconnected,
1175 observer_.ice_connection_state_, 1170 observer_.ice_connection_state_,
1176 kIceCandidatesTimeout + port_timeout); 1171 kIceCandidatesTimeout + port_timeout);
1177 } 1172 }
1178 1173
1179 void TestLoopbackCall() { 1174 void TestLoopbackCall() {
1180 LoopbackNetworkConfiguration config; 1175 LoopbackNetworkConfiguration config;
1181 TestLoopbackCall(config); 1176 TestLoopbackCall(config);
1182 } 1177 }
1183 1178
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
1191 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory. 1179 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory.
1192 void AddCNCodecs() { 1180 void AddCNCodecs() {
1193 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1, 0); 1181 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1, 0);
1194 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1, 0); 1182 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1, 0);
1195 1183
1196 // Add kCNCodec for dtmf test. 1184 // Add kCNCodec for dtmf test.
1197 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();; 1185 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();;
1198 codecs.push_back(kCNCodec1); 1186 codecs.push_back(kCNCodec1);
1199 codecs.push_back(kCNCodec2); 1187 codecs.push_back(kCNCodec2);
1200 media_engine_->SetAudioCodecs(codecs); 1188 media_engine_->SetAudioCodecs(codecs);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 } 1263 }
1276 1264
1277 void ConfigureAllocatorWithTurn() { 1265 void ConfigureAllocatorWithTurn() {
1278 cricket::RelayServerConfig relay_server(cricket::RELAY_TURN); 1266 cricket::RelayServerConfig relay_server(cricket::RELAY_TURN);
1279 cricket::RelayCredentials credentials(kTurnUsername, kTurnPassword); 1267 cricket::RelayCredentials credentials(kTurnUsername, kTurnPassword);
1280 relay_server.credentials = credentials; 1268 relay_server.credentials = credentials;
1281 relay_server.ports.push_back(cricket::ProtocolAddress( 1269 relay_server.ports.push_back(cricket::ProtocolAddress(
1282 kTurnUdpIntAddr, cricket::PROTO_UDP, false)); 1270 kTurnUdpIntAddr, cricket::PROTO_UDP, false));
1283 allocator_->AddRelay(relay_server); 1271 allocator_->AddRelay(relay_server);
1284 allocator_->set_step_delay(cricket::kMinimumStepDelay); 1272 allocator_->set_step_delay(cricket::kMinimumStepDelay);
1285 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | 1273 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP);
1286 cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG);
1287 } 1274 }
1288 1275
1289 cricket::FakeMediaEngine* media_engine_; 1276 cricket::FakeMediaEngine* media_engine_;
1290 cricket::FakeDataEngine* data_engine_; 1277 cricket::FakeDataEngine* data_engine_;
1291 cricket::FakeDeviceManager* device_manager_; 1278 cricket::FakeDeviceManager* device_manager_;
1292 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; 1279 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
1293 rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_; 1280 rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_;
1294 rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_; 1281 rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_;
1295 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_; 1282 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_;
1296 rtc::scoped_ptr<rtc::VirtualSocketServer> vss_; 1283 rtc::scoped_ptr<rtc::VirtualSocketServer> vss_;
(...skipping 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after
2581 RemoveIceUfragPwdLines(offer.get(), &sdp); 2568 RemoveIceUfragPwdLines(offer.get(), &sdp);
2582 SessionDescriptionInterface* modified_offer = 2569 SessionDescriptionInterface* modified_offer =
2583 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2570 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2584 SetRemoteDescriptionOfferExpectError(kSdpWithoutIceUfragPwd, modified_offer); 2571 SetRemoteDescriptionOfferExpectError(kSdpWithoutIceUfragPwd, modified_offer);
2585 } 2572 }
2586 2573
2587 // This test verifies that setLocalDescription fails if local offer has 2574 // This test verifies that setLocalDescription fails if local offer has
2588 // too short ice ufrag and pwd strings. 2575 // too short ice ufrag and pwd strings.
2589 TEST_F(WebRtcSessionTest, TestSetLocalDescriptionInvalidIceCredentials) { 2576 TEST_F(WebRtcSessionTest, TestSetLocalDescriptionInvalidIceCredentials) {
2590 Init(); 2577 Init();
2591 tdesc_factory_->set_protocol(cricket::ICEPROTO_RFC5245);
2592 mediastream_signaling_.SendAudioVideoStream1(); 2578 mediastream_signaling_.SendAudioVideoStream1();
2593 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer()); 2579 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer());
2594 2580
2595 std::string sdp; 2581 std::string sdp;
2596 // Modifying ice ufrag and pwd in local offer with strings smaller than the 2582 // Modifying ice ufrag and pwd in local offer with strings smaller than the
2597 // recommended values of 4 and 22 bytes respectively. 2583 // recommended values of 4 and 22 bytes respectively.
2598 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp); 2584 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp);
2599 SessionDescriptionInterface* modified_offer = 2585 SessionDescriptionInterface* modified_offer =
2600 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2586 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2601 std::string error; 2587 std::string error;
2602 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error)); 2588 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error));
2603 2589
2604 // Test with string greater than 256. 2590 // Test with string greater than 256.
2605 sdp.clear(); 2591 sdp.clear();
2606 ModifyIceUfragPwdLines(offer.get(), kTooLongIceUfragPwd, kTooLongIceUfragPwd, 2592 ModifyIceUfragPwdLines(offer.get(), kTooLongIceUfragPwd, kTooLongIceUfragPwd,
2607 &sdp); 2593 &sdp);
2608 modified_offer = CreateSessionDescription(JsepSessionDescription::kOffer, sdp, 2594 modified_offer = CreateSessionDescription(JsepSessionDescription::kOffer, sdp,
2609 NULL); 2595 NULL);
2610 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error)); 2596 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error));
2611 } 2597 }
2612 2598
2613 // This test verifies that setRemoteDescription fails if remote offer has 2599 // This test verifies that setRemoteDescription fails if remote offer has
2614 // too short ice ufrag and pwd strings. 2600 // too short ice ufrag and pwd strings.
2615 TEST_F(WebRtcSessionTest, TestSetRemoteDescriptionInvalidIceCredentials) { 2601 TEST_F(WebRtcSessionTest, TestSetRemoteDescriptionInvalidIceCredentials) {
2616 Init(); 2602 Init();
2617 tdesc_factory_->set_protocol(cricket::ICEPROTO_RFC5245);
2618 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer()); 2603 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer());
2619 std::string sdp; 2604 std::string sdp;
2620 // Modifying ice ufrag and pwd in remote offer with strings smaller than the 2605 // Modifying ice ufrag and pwd in remote offer with strings smaller than the
2621 // recommended values of 4 and 22 bytes respectively. 2606 // recommended values of 4 and 22 bytes respectively.
2622 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp); 2607 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp);
2623 SessionDescriptionInterface* modified_offer = 2608 SessionDescriptionInterface* modified_offer =
2624 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2609 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2625 std::string error; 2610 std::string error;
2626 EXPECT_FALSE(session_->SetRemoteDescription(modified_offer, &error)); 2611 EXPECT_FALSE(session_->SetRemoteDescription(modified_offer, &error));
2627 2612
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
3181 EXPECT_FALSE(session_->initiator()); 3166 EXPECT_FALSE(session_->initiator());
3182 SessionDescriptionInterface* offer = CreateRemoteOffer(); 3167 SessionDescriptionInterface* offer = CreateRemoteOffer();
3183 SetRemoteDescriptionWithoutError(offer); 3168 SetRemoteDescriptionWithoutError(offer);
3184 SessionDescriptionInterface* answer = CreateAnswer(NULL); 3169 SessionDescriptionInterface* answer = CreateAnswer(NULL);
3185 3170
3186 EXPECT_FALSE(session_->initiator()); 3171 EXPECT_FALSE(session_->initiator());
3187 SetLocalDescriptionWithoutError(answer); 3172 SetLocalDescriptionWithoutError(answer);
3188 EXPECT_FALSE(session_->initiator()); 3173 EXPECT_FALSE(session_->initiator());
3189 } 3174 }
3190 3175
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
3240 // Verifing local offer and remote answer have matching m-lines as per RFC 3264. 3176 // Verifing local offer and remote answer have matching m-lines as per RFC 3264.
3241 TEST_F(WebRtcSessionTest, TestIncorrectMLinesInRemoteAnswer) { 3177 TEST_F(WebRtcSessionTest, TestIncorrectMLinesInRemoteAnswer) {
3242 Init(); 3178 Init();
3243 mediastream_signaling_.SendAudioVideoStream1(); 3179 mediastream_signaling_.SendAudioVideoStream1();
3244 SessionDescriptionInterface* offer = CreateOffer(); 3180 SessionDescriptionInterface* offer = CreateOffer();
3245 SetLocalDescriptionWithoutError(offer); 3181 SetLocalDescriptionWithoutError(offer);
3246 rtc::scoped_ptr<SessionDescriptionInterface> answer( 3182 rtc::scoped_ptr<SessionDescriptionInterface> answer(
3247 CreateRemoteAnswer(session_->local_description())); 3183 CreateRemoteAnswer(session_->local_description()));
3248 3184
3249 cricket::SessionDescription* answer_copy = answer->description()->Copy(); 3185 cricket::SessionDescription* answer_copy = answer->description()->Copy();
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
3450 3386
3451 mediastream_signaling_.SendAudioVideoStream2(); 3387 mediastream_signaling_.SendAudioVideoStream2();
3452 SessionDescriptionInterface* answer = 3388 SessionDescriptionInterface* answer =
3453 CreateRemoteAnswer(session_->local_description()); 3389 CreateRemoteAnswer(session_->local_description());
3454 SetRemoteDescriptionAnswerExpectError("ERROR_CONTENT", answer); 3390 SetRemoteDescriptionAnswerExpectError("ERROR_CONTENT", answer);
3455 } 3391 }
3456 3392
3457 // Runs the loopback call test with BUNDLE and STUN disabled. 3393 // Runs the loopback call test with BUNDLE and STUN disabled.
3458 TEST_F(WebRtcSessionTest, TestIceStatesBasic) { 3394 TEST_F(WebRtcSessionTest, TestIceStatesBasic) {
3459 // Lets try with only UDP ports. 3395 // Lets try with only UDP ports.
3460 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | 3396 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
3461 cricket::PORTALLOCATOR_DISABLE_TCP |
3462 cricket::PORTALLOCATOR_DISABLE_STUN | 3397 cricket::PORTALLOCATOR_DISABLE_STUN |
3463 cricket::PORTALLOCATOR_DISABLE_RELAY); 3398 cricket::PORTALLOCATOR_DISABLE_RELAY);
3464 TestLoopbackCall(); 3399 TestLoopbackCall();
3465 } 3400 }
3466 3401
3467 TEST_F(WebRtcSessionTest, TestIceStatesBasicIPv6) { 3402 TEST_F(WebRtcSessionTest, TestIceStatesBasicIPv6) {
3468 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | 3403 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
3469 cricket::PORTALLOCATOR_DISABLE_TCP |
3470 cricket::PORTALLOCATOR_DISABLE_STUN | 3404 cricket::PORTALLOCATOR_DISABLE_STUN |
3471 cricket::PORTALLOCATOR_ENABLE_IPV6 | 3405 cricket::PORTALLOCATOR_ENABLE_IPV6 |
3472 cricket::PORTALLOCATOR_DISABLE_RELAY); 3406 cricket::PORTALLOCATOR_DISABLE_RELAY);
3473 3407
3474 // best connection is IPv6 since it has higher network preference. 3408 // best connection is IPv6 since it has higher network preference.
3475 LoopbackNetworkConfiguration config; 3409 LoopbackNetworkConfiguration config;
3476 config.test_ipv6_network_ = true; 3410 config.test_ipv6_network_ = true;
3477 config.best_connection_after_initial_ice_converged_ = 3411 config.best_connection_after_initial_ice_converged_ =
3478 LoopbackNetworkConfiguration::ExpectedBestConnection(0, 1); 3412 LoopbackNetworkConfiguration::ExpectedBestConnection(0, 1);
3479 3413
3480 TestLoopbackCall(config); 3414 TestLoopbackCall(config);
3481 } 3415 }
3482 3416
3483 // Runs the loopback call test with BUNDLE and STUN enabled. 3417 // Runs the loopback call test with BUNDLE and STUN enabled.
3484 TEST_F(WebRtcSessionTest, TestIceStatesBundle) { 3418 TEST_F(WebRtcSessionTest, TestIceStatesBundle) {
3485 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | 3419 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
3486 cricket::PORTALLOCATOR_DISABLE_TCP | 3420 cricket::PORTALLOCATOR_DISABLE_RELAY);
3487 cricket::PORTALLOCATOR_DISABLE_RELAY);
3488 TestLoopbackCall(); 3421 TestLoopbackCall();
3489 } 3422 }
3490 3423
3491 TEST_F(WebRtcSessionTest, SetSdpFailedOnSessionError) { 3424 TEST_F(WebRtcSessionTest, SetSdpFailedOnSessionError) {
3492 Init(); 3425 Init();
3493 cricket::MediaSessionOptions options; 3426 cricket::MediaSessionOptions options;
3494 options.recv_video = true; 3427 options.recv_video = true;
3495 3428
3496 cricket::BaseSession::Error error_code = cricket::BaseSession::ERROR_CONTENT; 3429 cricket::BaseSession::Error error_code = cricket::BaseSession::ERROR_CONTENT;
3497 std::string error_code_str = "ERROR_CONTENT"; 3430 std::string error_code_str = "ERROR_CONTENT";
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
4004 } 3937 }
4005 } 3938 }
4006 3939
4007 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 3940 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
4008 // currently fails because upon disconnection and reconnection OnIceComplete is 3941 // currently fails because upon disconnection and reconnection OnIceComplete is
4009 // called more than once without returning to IceGatheringGathering. 3942 // called more than once without returning to IceGatheringGathering.
4010 3943
4011 INSTANTIATE_TEST_CASE_P( 3944 INSTANTIATE_TEST_CASE_P(
4012 WebRtcSessionTests, WebRtcSessionTest, 3945 WebRtcSessionTests, WebRtcSessionTest,
4013 testing::Values(ALREADY_GENERATED, DTLS_IDENTITY_STORE)); 3946 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