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

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

Issue 1303393002: Reland "Remove GICE (gone forever!) and PORTALLOCATOR_ENABLE_SHARED_UFRAG (enabled forever)." becau… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add memcheck suppression Created 5 years, 4 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 vss_(new rtc::VirtualSocketServer(pss_.get())), 328 vss_(new rtc::VirtualSocketServer(pss_.get())),
331 fss_(new rtc::FirewallSocketServer(vss_.get())), 329 fss_(new rtc::FirewallSocketServer(vss_.get())),
332 ss_scope_(fss_.get()), 330 ss_scope_(fss_.get()),
333 stun_socket_addr_(rtc::SocketAddress(kStunAddrHost, 331 stun_socket_addr_(rtc::SocketAddress(kStunAddrHost,
334 cricket::STUN_SERVER_PORT)), 332 cricket::STUN_SERVER_PORT)),
335 stun_server_(cricket::TestStunServer::Create(Thread::Current(), 333 stun_server_(cricket::TestStunServer::Create(Thread::Current(),
336 stun_socket_addr_)), 334 stun_socket_addr_)),
337 turn_server_(Thread::Current(), kTurnUdpIntAddr, kTurnUdpExtAddr), 335 turn_server_(Thread::Current(), kTurnUdpIntAddr, kTurnUdpExtAddr),
338 mediastream_signaling_(channel_manager_.get()), 336 mediastream_signaling_(channel_manager_.get()),
339 metrics_observer_(new rtc::RefCountedObject<FakeMetricsObserver>()) { 337 metrics_observer_(new rtc::RefCountedObject<FakeMetricsObserver>()) {
340 tdesc_factory_->set_protocol(cricket::ICEPROTO_HYBRID);
341
342 cricket::ServerAddresses stun_servers; 338 cricket::ServerAddresses stun_servers;
343 stun_servers.insert(stun_socket_addr_); 339 stun_servers.insert(stun_socket_addr_);
344 allocator_.reset(new cricket::BasicPortAllocator( 340 allocator_.reset(new cricket::BasicPortAllocator(
345 &network_manager_, 341 &network_manager_,
346 stun_servers, 342 stun_servers,
347 SocketAddress(), SocketAddress(), SocketAddress())); 343 SocketAddress(), SocketAddress(), SocketAddress()));
348 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | 344 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
349 cricket::PORTALLOCATOR_DISABLE_RELAY | 345 cricket::PORTALLOCATOR_DISABLE_RELAY);
350 cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG);
351 EXPECT_TRUE(channel_manager_->Init()); 346 EXPECT_TRUE(channel_manager_->Init());
352 desc_factory_->set_add_legacy_streams(false); 347 desc_factory_->set_add_legacy_streams(false);
353 allocator_->set_step_delay(cricket::kMinimumStepDelay); 348 allocator_->set_step_delay(cricket::kMinimumStepDelay);
354 } 349 }
355 350
356 void AddInterface(const SocketAddress& addr) { 351 void AddInterface(const SocketAddress& addr) {
357 network_manager_.AddInterface(addr); 352 network_manager_.AddInterface(addr);
358 } 353 }
359 354
360 void Init( 355 void Init(
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionDisconnected, 1139 EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionDisconnected,
1145 observer_.ice_connection_state_, 1140 observer_.ice_connection_state_,
1146 kIceCandidatesTimeout + port_timeout); 1141 kIceCandidatesTimeout + port_timeout);
1147 } 1142 }
1148 1143
1149 void TestLoopbackCall() { 1144 void TestLoopbackCall() {
1150 LoopbackNetworkConfiguration config; 1145 LoopbackNetworkConfiguration config;
1151 TestLoopbackCall(config); 1146 TestLoopbackCall(config);
1152 } 1147 }
1153 1148
1154 void VerifyTransportType(const std::string& content_name,
1155 cricket::TransportProtocol protocol) {
1156 const cricket::Transport* transport = session_->GetTransport(content_name);
1157 ASSERT_TRUE(transport != NULL);
1158 EXPECT_EQ(protocol, transport->protocol());
1159 }
1160
1161 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory. 1149 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory.
1162 void AddCNCodecs() { 1150 void AddCNCodecs() {
1163 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1, 0); 1151 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1, 0);
1164 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1, 0); 1152 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1, 0);
1165 1153
1166 // Add kCNCodec for dtmf test. 1154 // Add kCNCodec for dtmf test.
1167 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();; 1155 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();;
1168 codecs.push_back(kCNCodec1); 1156 codecs.push_back(kCNCodec1);
1169 codecs.push_back(kCNCodec2); 1157 codecs.push_back(kCNCodec2);
1170 media_engine_->SetAudioCodecs(codecs); 1158 media_engine_->SetAudioCodecs(codecs);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 } 1220 }
1233 1221
1234 void ConfigureAllocatorWithTurn() { 1222 void ConfigureAllocatorWithTurn() {
1235 cricket::RelayServerConfig relay_server(cricket::RELAY_TURN); 1223 cricket::RelayServerConfig relay_server(cricket::RELAY_TURN);
1236 cricket::RelayCredentials credentials(kTurnUsername, kTurnPassword); 1224 cricket::RelayCredentials credentials(kTurnUsername, kTurnPassword);
1237 relay_server.credentials = credentials; 1225 relay_server.credentials = credentials;
1238 relay_server.ports.push_back(cricket::ProtocolAddress( 1226 relay_server.ports.push_back(cricket::ProtocolAddress(
1239 kTurnUdpIntAddr, cricket::PROTO_UDP, false)); 1227 kTurnUdpIntAddr, cricket::PROTO_UDP, false));
1240 allocator_->AddRelay(relay_server); 1228 allocator_->AddRelay(relay_server);
1241 allocator_->set_step_delay(cricket::kMinimumStepDelay); 1229 allocator_->set_step_delay(cricket::kMinimumStepDelay);
1242 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | 1230 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP);
1243 cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG);
1244 } 1231 }
1245 1232
1246 cricket::FakeMediaEngine* media_engine_; 1233 cricket::FakeMediaEngine* media_engine_;
1247 cricket::FakeDataEngine* data_engine_; 1234 cricket::FakeDataEngine* data_engine_;
1248 cricket::FakeDeviceManager* device_manager_; 1235 cricket::FakeDeviceManager* device_manager_;
1249 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; 1236 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
1250 rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_; 1237 rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_;
1251 rtc::scoped_ptr<rtc::SSLIdentity> identity_; 1238 rtc::scoped_ptr<rtc::SSLIdentity> identity_;
1252 rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_; 1239 rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_;
1253 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_; 1240 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_;
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2539 RemoveIceUfragPwdLines(offer.get(), &sdp); 2526 RemoveIceUfragPwdLines(offer.get(), &sdp);
2540 SessionDescriptionInterface* modified_offer = 2527 SessionDescriptionInterface* modified_offer =
2541 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2528 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2542 SetRemoteDescriptionOfferExpectError(kSdpWithoutIceUfragPwd, modified_offer); 2529 SetRemoteDescriptionOfferExpectError(kSdpWithoutIceUfragPwd, modified_offer);
2543 } 2530 }
2544 2531
2545 // This test verifies that setLocalDescription fails if local offer has 2532 // This test verifies that setLocalDescription fails if local offer has
2546 // too short ice ufrag and pwd strings. 2533 // too short ice ufrag and pwd strings.
2547 TEST_F(WebRtcSessionTest, TestSetLocalDescriptionInvalidIceCredentials) { 2534 TEST_F(WebRtcSessionTest, TestSetLocalDescriptionInvalidIceCredentials) {
2548 Init(); 2535 Init();
2549 tdesc_factory_->set_protocol(cricket::ICEPROTO_RFC5245);
2550 mediastream_signaling_.SendAudioVideoStream1(); 2536 mediastream_signaling_.SendAudioVideoStream1();
2551 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer()); 2537 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer());
2552 2538
2553 std::string sdp; 2539 std::string sdp;
2554 // Modifying ice ufrag and pwd in local offer with strings smaller than the 2540 // Modifying ice ufrag and pwd in local offer with strings smaller than the
2555 // recommended values of 4 and 22 bytes respectively. 2541 // recommended values of 4 and 22 bytes respectively.
2556 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp); 2542 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp);
2557 SessionDescriptionInterface* modified_offer = 2543 SessionDescriptionInterface* modified_offer =
2558 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2544 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2559 std::string error; 2545 std::string error;
2560 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error)); 2546 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error));
2561 2547
2562 // Test with string greater than 256. 2548 // Test with string greater than 256.
2563 sdp.clear(); 2549 sdp.clear();
2564 ModifyIceUfragPwdLines(offer.get(), kTooLongIceUfragPwd, kTooLongIceUfragPwd, 2550 ModifyIceUfragPwdLines(offer.get(), kTooLongIceUfragPwd, kTooLongIceUfragPwd,
2565 &sdp); 2551 &sdp);
2566 modified_offer = CreateSessionDescription(JsepSessionDescription::kOffer, sdp, 2552 modified_offer = CreateSessionDescription(JsepSessionDescription::kOffer, sdp,
2567 NULL); 2553 NULL);
2568 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error)); 2554 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error));
2569 } 2555 }
2570 2556
2571 // This test verifies that setRemoteDescription fails if remote offer has 2557 // This test verifies that setRemoteDescription fails if remote offer has
2572 // too short ice ufrag and pwd strings. 2558 // too short ice ufrag and pwd strings.
2573 TEST_F(WebRtcSessionTest, TestSetRemoteDescriptionInvalidIceCredentials) { 2559 TEST_F(WebRtcSessionTest, TestSetRemoteDescriptionInvalidIceCredentials) {
2574 Init(); 2560 Init();
2575 tdesc_factory_->set_protocol(cricket::ICEPROTO_RFC5245);
2576 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer()); 2561 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer());
2577 std::string sdp; 2562 std::string sdp;
2578 // Modifying ice ufrag and pwd in remote offer with strings smaller than the 2563 // Modifying ice ufrag and pwd in remote offer with strings smaller than the
2579 // recommended values of 4 and 22 bytes respectively. 2564 // recommended values of 4 and 22 bytes respectively.
2580 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp); 2565 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp);
2581 SessionDescriptionInterface* modified_offer = 2566 SessionDescriptionInterface* modified_offer =
2582 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2567 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2583 std::string error; 2568 std::string error;
2584 EXPECT_FALSE(session_->SetRemoteDescription(modified_offer, &error)); 2569 EXPECT_FALSE(session_->SetRemoteDescription(modified_offer, &error));
2585 2570
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
3139 EXPECT_FALSE(session_->initiator()); 3124 EXPECT_FALSE(session_->initiator());
3140 SessionDescriptionInterface* offer = CreateRemoteOffer(); 3125 SessionDescriptionInterface* offer = CreateRemoteOffer();
3141 SetRemoteDescriptionWithoutError(offer); 3126 SetRemoteDescriptionWithoutError(offer);
3142 SessionDescriptionInterface* answer = CreateAnswer(NULL); 3127 SessionDescriptionInterface* answer = CreateAnswer(NULL);
3143 3128
3144 EXPECT_FALSE(session_->initiator()); 3129 EXPECT_FALSE(session_->initiator());
3145 SetLocalDescriptionWithoutError(answer); 3130 SetLocalDescriptionWithoutError(answer);
3146 EXPECT_FALSE(session_->initiator()); 3131 EXPECT_FALSE(session_->initiator());
3147 } 3132 }
3148 3133
3149 // This test verifies the ice protocol type at initiator of the call
3150 // if |a=ice-options:google-ice| is present in answer.
3151 TEST_F(WebRtcSessionTest, TestInitiatorGIceInAnswer) {
3152 Init();
3153 mediastream_signaling_.SendAudioVideoStream1();
3154 SessionDescriptionInterface* offer = CreateOffer();
3155 rtc::scoped_ptr<SessionDescriptionInterface> answer(
3156 CreateRemoteAnswer(offer));
3157 SetLocalDescriptionWithoutError(offer);
3158 std::string sdp;
3159 EXPECT_TRUE(answer->ToString(&sdp));
3160 // Adding ice-options to the session level.
3161 InjectAfter("t=0 0\r\n",
3162 "a=ice-options:google-ice\r\n",
3163 &sdp);
3164 SessionDescriptionInterface* answer_with_gice =
3165 CreateSessionDescription(JsepSessionDescription::kAnswer, sdp, NULL);
3166 // Default offer is ICEPROTO_RFC5245, so we expect responder with
3167 // only gice to fail.
3168 SetRemoteDescriptionAnswerExpectError(kPushDownTDFailed, answer_with_gice);
3169 }
3170
3171 // This test verifies the ice protocol type at initiator of the call
3172 // if ICE RFC5245 is supported in answer.
3173 TEST_F(WebRtcSessionTest, TestInitiatorIceInAnswer) {
3174 Init();
3175 mediastream_signaling_.SendAudioVideoStream1();
3176 SessionDescriptionInterface* offer = CreateOffer();
3177 SessionDescriptionInterface* answer = CreateRemoteAnswer(offer);
3178 SetLocalDescriptionWithoutError(offer);
3179
3180 SetRemoteDescriptionWithoutError(answer);
3181 VerifyTransportType("audio", cricket::ICEPROTO_RFC5245);
3182 VerifyTransportType("video", cricket::ICEPROTO_RFC5245);
3183 }
3184
3185 // This test verifies the ice protocol type at receiver side of the call if
3186 // receiver decides to use ice RFC 5245.
3187 TEST_F(WebRtcSessionTest, TestReceiverIceInOffer) {
3188 Init();
3189 mediastream_signaling_.SendAudioVideoStream1();
3190 SessionDescriptionInterface* offer = CreateOffer();
3191 SetRemoteDescriptionWithoutError(offer);
3192 SessionDescriptionInterface* answer = CreateAnswer(NULL);
3193 SetLocalDescriptionWithoutError(answer);
3194 VerifyTransportType("audio", cricket::ICEPROTO_RFC5245);
3195 VerifyTransportType("video", cricket::ICEPROTO_RFC5245);
3196 }
3197
3198 // Verifing local offer and remote answer have matching m-lines as per RFC 3264. 3134 // Verifing local offer and remote answer have matching m-lines as per RFC 3264.
3199 TEST_F(WebRtcSessionTest, TestIncorrectMLinesInRemoteAnswer) { 3135 TEST_F(WebRtcSessionTest, TestIncorrectMLinesInRemoteAnswer) {
3200 Init(); 3136 Init();
3201 mediastream_signaling_.SendAudioVideoStream1(); 3137 mediastream_signaling_.SendAudioVideoStream1();
3202 SessionDescriptionInterface* offer = CreateOffer(); 3138 SessionDescriptionInterface* offer = CreateOffer();
3203 SetLocalDescriptionWithoutError(offer); 3139 SetLocalDescriptionWithoutError(offer);
3204 rtc::scoped_ptr<SessionDescriptionInterface> answer( 3140 rtc::scoped_ptr<SessionDescriptionInterface> answer(
3205 CreateRemoteAnswer(session_->local_description())); 3141 CreateRemoteAnswer(session_->local_description()));
3206 3142
3207 cricket::SessionDescription* answer_copy = answer->description()->Copy(); 3143 cricket::SessionDescription* answer_copy = answer->description()->Copy();
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
3408 3344
3409 mediastream_signaling_.SendAudioVideoStream2(); 3345 mediastream_signaling_.SendAudioVideoStream2();
3410 SessionDescriptionInterface* answer = 3346 SessionDescriptionInterface* answer =
3411 CreateRemoteAnswer(session_->local_description()); 3347 CreateRemoteAnswer(session_->local_description());
3412 SetRemoteDescriptionAnswerExpectError("ERROR_CONTENT", answer); 3348 SetRemoteDescriptionAnswerExpectError("ERROR_CONTENT", answer);
3413 } 3349 }
3414 3350
3415 // Runs the loopback call test with BUNDLE and STUN disabled. 3351 // Runs the loopback call test with BUNDLE and STUN disabled.
3416 TEST_F(WebRtcSessionTest, TestIceStatesBasic) { 3352 TEST_F(WebRtcSessionTest, TestIceStatesBasic) {
3417 // Lets try with only UDP ports. 3353 // Lets try with only UDP ports.
3418 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | 3354 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
3419 cricket::PORTALLOCATOR_DISABLE_TCP |
3420 cricket::PORTALLOCATOR_DISABLE_STUN | 3355 cricket::PORTALLOCATOR_DISABLE_STUN |
3421 cricket::PORTALLOCATOR_DISABLE_RELAY); 3356 cricket::PORTALLOCATOR_DISABLE_RELAY);
3422 TestLoopbackCall(); 3357 TestLoopbackCall();
3423 } 3358 }
3424 3359
3425 TEST_F(WebRtcSessionTest, TestIceStatesBasicIPv6) { 3360 TEST_F(WebRtcSessionTest, TestIceStatesBasicIPv6) {
3426 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | 3361 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
3427 cricket::PORTALLOCATOR_DISABLE_TCP |
3428 cricket::PORTALLOCATOR_DISABLE_STUN | 3362 cricket::PORTALLOCATOR_DISABLE_STUN |
3429 cricket::PORTALLOCATOR_ENABLE_IPV6 | 3363 cricket::PORTALLOCATOR_ENABLE_IPV6 |
3430 cricket::PORTALLOCATOR_DISABLE_RELAY); 3364 cricket::PORTALLOCATOR_DISABLE_RELAY);
3431 3365
3432 // best connection is IPv6 since it has higher network preference. 3366 // best connection is IPv6 since it has higher network preference.
3433 LoopbackNetworkConfiguration config; 3367 LoopbackNetworkConfiguration config;
3434 config.test_ipv6_network_ = true; 3368 config.test_ipv6_network_ = true;
3435 config.best_connection_after_initial_ice_converged_ = 3369 config.best_connection_after_initial_ice_converged_ =
3436 LoopbackNetworkConfiguration::ExpectedBestConnection(0, 1); 3370 LoopbackNetworkConfiguration::ExpectedBestConnection(0, 1);
3437 3371
3438 TestLoopbackCall(config); 3372 TestLoopbackCall(config);
3439 } 3373 }
3440 3374
3441 // Runs the loopback call test with BUNDLE and STUN enabled. 3375 // Runs the loopback call test with BUNDLE and STUN enabled.
3442 TEST_F(WebRtcSessionTest, TestIceStatesBundle) { 3376 TEST_F(WebRtcSessionTest, TestIceStatesBundle) {
3443 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | 3377 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
3444 cricket::PORTALLOCATOR_DISABLE_TCP | 3378 cricket::PORTALLOCATOR_DISABLE_RELAY);
3445 cricket::PORTALLOCATOR_DISABLE_RELAY);
3446 TestLoopbackCall(); 3379 TestLoopbackCall();
3447 } 3380 }
3448 3381
3449 TEST_F(WebRtcSessionTest, SetSdpFailedOnSessionError) { 3382 TEST_F(WebRtcSessionTest, SetSdpFailedOnSessionError) {
3450 Init(); 3383 Init();
3451 cricket::MediaSessionOptions options; 3384 cricket::MediaSessionOptions options;
3452 options.recv_video = true; 3385 options.recv_video = true;
3453 3386
3454 cricket::BaseSession::Error error_code = cricket::BaseSession::ERROR_CONTENT; 3387 cricket::BaseSession::Error error_code = cricket::BaseSession::ERROR_CONTENT;
3455 std::string error_code_str = "ERROR_CONTENT"; 3388 std::string error_code_str = "ERROR_CONTENT";
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
3952 // terminated. The offer creation may or may not have succeeded, but we 3885 // terminated. The offer creation may or may not have succeeded, but we
3953 // must have received a notification which, so the only invalid state 3886 // must have received a notification which, so the only invalid state
3954 // is kInit. 3887 // is kInit.
3955 EXPECT_NE(WebRtcSessionCreateSDPObserverForTest::kInit, o->state()); 3888 EXPECT_NE(WebRtcSessionCreateSDPObserverForTest::kInit, o->state());
3956 } 3889 }
3957 } 3890 }
3958 3891
3959 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 3892 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
3960 // currently fails because upon disconnection and reconnection OnIceComplete is 3893 // currently fails because upon disconnection and reconnection OnIceComplete is
3961 // called more than once without returning to IceGatheringGathering. 3894 // called more than once without returning to IceGatheringGathering.
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