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

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

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