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

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

Issue 1291363005: 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: fix spelling 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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionDisconnected, 1131 EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionDisconnected,
1137 observer_.ice_connection_state_, 1132 observer_.ice_connection_state_,
1138 kIceCandidatesTimeout + port_timeout); 1133 kIceCandidatesTimeout + port_timeout);
1139 } 1134 }
1140 1135
1141 void TestLoopbackCall() { 1136 void TestLoopbackCall() {
1142 LoopbackNetworkConfiguration config; 1137 LoopbackNetworkConfiguration config;
1143 TestLoopbackCall(config); 1138 TestLoopbackCall(config);
1144 } 1139 }
1145 1140
1146 void VerifyTransportType(const std::string& content_name,
1147 cricket::TransportProtocol protocol) {
1148 const cricket::Transport* transport = session_->GetTransport(content_name);
1149 ASSERT_TRUE(transport != NULL);
1150 EXPECT_EQ(protocol, transport->protocol());
1151 }
1152
1153 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory. 1141 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory.
1154 void AddCNCodecs() { 1142 void AddCNCodecs() {
1155 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1, 0); 1143 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1, 0);
1156 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1, 0); 1144 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1, 0);
1157 1145
1158 // Add kCNCodec for dtmf test. 1146 // Add kCNCodec for dtmf test.
1159 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();; 1147 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();;
1160 codecs.push_back(kCNCodec1); 1148 codecs.push_back(kCNCodec1);
1161 codecs.push_back(kCNCodec2); 1149 codecs.push_back(kCNCodec2);
1162 media_engine_->SetAudioCodecs(codecs); 1150 media_engine_->SetAudioCodecs(codecs);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 } 1212 }
1225 1213
1226 void ConfigureAllocatorWithTurn() { 1214 void ConfigureAllocatorWithTurn() {
1227 cricket::RelayServerConfig relay_server(cricket::RELAY_TURN); 1215 cricket::RelayServerConfig relay_server(cricket::RELAY_TURN);
1228 cricket::RelayCredentials credentials(kTurnUsername, kTurnPassword); 1216 cricket::RelayCredentials credentials(kTurnUsername, kTurnPassword);
1229 relay_server.credentials = credentials; 1217 relay_server.credentials = credentials;
1230 relay_server.ports.push_back(cricket::ProtocolAddress( 1218 relay_server.ports.push_back(cricket::ProtocolAddress(
1231 kTurnUdpIntAddr, cricket::PROTO_UDP, false)); 1219 kTurnUdpIntAddr, cricket::PROTO_UDP, false));
1232 allocator_->AddRelay(relay_server); 1220 allocator_->AddRelay(relay_server);
1233 allocator_->set_step_delay(cricket::kMinimumStepDelay); 1221 allocator_->set_step_delay(cricket::kMinimumStepDelay);
1234 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | 1222 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP);
1235 cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG);
1236 } 1223 }
1237 1224
1238 cricket::FakeMediaEngine* media_engine_; 1225 cricket::FakeMediaEngine* media_engine_;
1239 cricket::FakeDataEngine* data_engine_; 1226 cricket::FakeDataEngine* data_engine_;
1240 cricket::FakeDeviceManager* device_manager_; 1227 cricket::FakeDeviceManager* device_manager_;
1241 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; 1228 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
1242 rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_; 1229 rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_;
1243 rtc::scoped_ptr<rtc::SSLIdentity> identity_; 1230 rtc::scoped_ptr<rtc::SSLIdentity> identity_;
1244 rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_; 1231 rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_;
1245 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_; 1232 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_;
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2531 RemoveIceUfragPwdLines(offer.get(), &sdp); 2518 RemoveIceUfragPwdLines(offer.get(), &sdp);
2532 SessionDescriptionInterface* modified_offer = 2519 SessionDescriptionInterface* modified_offer =
2533 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2520 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2534 SetRemoteDescriptionOfferExpectError(kSdpWithoutIceUfragPwd, modified_offer); 2521 SetRemoteDescriptionOfferExpectError(kSdpWithoutIceUfragPwd, modified_offer);
2535 } 2522 }
2536 2523
2537 // This test verifies that setLocalDescription fails if local offer has 2524 // This test verifies that setLocalDescription fails if local offer has
2538 // too short ice ufrag and pwd strings. 2525 // too short ice ufrag and pwd strings.
2539 TEST_F(WebRtcSessionTest, TestSetLocalDescriptionInvalidIceCredentials) { 2526 TEST_F(WebRtcSessionTest, TestSetLocalDescriptionInvalidIceCredentials) {
2540 Init(); 2527 Init();
2541 tdesc_factory_->set_protocol(cricket::ICEPROTO_RFC5245);
2542 mediastream_signaling_.SendAudioVideoStream1(); 2528 mediastream_signaling_.SendAudioVideoStream1();
2543 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer()); 2529 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer());
2544 2530
2545 std::string sdp; 2531 std::string sdp;
2546 // Modifying ice ufrag and pwd in local offer with strings smaller than the 2532 // Modifying ice ufrag and pwd in local offer with strings smaller than the
2547 // recommended values of 4 and 22 bytes respectively. 2533 // recommended values of 4 and 22 bytes respectively.
2548 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp); 2534 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp);
2549 SessionDescriptionInterface* modified_offer = 2535 SessionDescriptionInterface* modified_offer =
2550 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2536 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2551 std::string error; 2537 std::string error;
2552 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error)); 2538 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error));
2553 2539
2554 // Test with string greater than 256. 2540 // Test with string greater than 256.
2555 sdp.clear(); 2541 sdp.clear();
2556 ModifyIceUfragPwdLines(offer.get(), kTooLongIceUfragPwd, kTooLongIceUfragPwd, 2542 ModifyIceUfragPwdLines(offer.get(), kTooLongIceUfragPwd, kTooLongIceUfragPwd,
2557 &sdp); 2543 &sdp);
2558 modified_offer = CreateSessionDescription(JsepSessionDescription::kOffer, sdp, 2544 modified_offer = CreateSessionDescription(JsepSessionDescription::kOffer, sdp,
2559 NULL); 2545 NULL);
2560 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error)); 2546 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error));
2561 } 2547 }
2562 2548
2563 // This test verifies that setRemoteDescription fails if remote offer has 2549 // This test verifies that setRemoteDescription fails if remote offer has
2564 // too short ice ufrag and pwd strings. 2550 // too short ice ufrag and pwd strings.
2565 TEST_F(WebRtcSessionTest, TestSetRemoteDescriptionInvalidIceCredentials) { 2551 TEST_F(WebRtcSessionTest, TestSetRemoteDescriptionInvalidIceCredentials) {
2566 Init(); 2552 Init();
2567 tdesc_factory_->set_protocol(cricket::ICEPROTO_RFC5245);
2568 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer()); 2553 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer());
2569 std::string sdp; 2554 std::string sdp;
2570 // Modifying ice ufrag and pwd in remote offer with strings smaller than the 2555 // Modifying ice ufrag and pwd in remote offer with strings smaller than the
2571 // recommended values of 4 and 22 bytes respectively. 2556 // recommended values of 4 and 22 bytes respectively.
2572 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp); 2557 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp);
2573 SessionDescriptionInterface* modified_offer = 2558 SessionDescriptionInterface* modified_offer =
2574 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2559 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2575 std::string error; 2560 std::string error;
2576 EXPECT_FALSE(session_->SetRemoteDescription(modified_offer, &error)); 2561 EXPECT_FALSE(session_->SetRemoteDescription(modified_offer, &error));
2577 2562
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
3131 EXPECT_FALSE(session_->initiator()); 3116 EXPECT_FALSE(session_->initiator());
3132 SessionDescriptionInterface* offer = CreateRemoteOffer(); 3117 SessionDescriptionInterface* offer = CreateRemoteOffer();
3133 SetRemoteDescriptionWithoutError(offer); 3118 SetRemoteDescriptionWithoutError(offer);
3134 SessionDescriptionInterface* answer = CreateAnswer(NULL); 3119 SessionDescriptionInterface* answer = CreateAnswer(NULL);
3135 3120
3136 EXPECT_FALSE(session_->initiator()); 3121 EXPECT_FALSE(session_->initiator());
3137 SetLocalDescriptionWithoutError(answer); 3122 SetLocalDescriptionWithoutError(answer);
3138 EXPECT_FALSE(session_->initiator()); 3123 EXPECT_FALSE(session_->initiator());
3139 } 3124 }
3140 3125
3141 // This test verifies the ice protocol type at initiator of the call
3142 // if |a=ice-options:google-ice| is present in answer.
3143 TEST_F(WebRtcSessionTest, TestInitiatorGIceInAnswer) {
3144 Init();
3145 mediastream_signaling_.SendAudioVideoStream1();
3146 SessionDescriptionInterface* offer = CreateOffer();
3147 rtc::scoped_ptr<SessionDescriptionInterface> answer(
3148 CreateRemoteAnswer(offer));
3149 SetLocalDescriptionWithoutError(offer);
3150 std::string sdp;
3151 EXPECT_TRUE(answer->ToString(&sdp));
3152 // Adding ice-options to the session level.
3153 InjectAfter("t=0 0\r\n",
3154 "a=ice-options:google-ice\r\n",
3155 &sdp);
3156 SessionDescriptionInterface* answer_with_gice =
3157 CreateSessionDescription(JsepSessionDescription::kAnswer, sdp, NULL);
3158 // Default offer is ICEPROTO_RFC5245, so we expect responder with
3159 // only gice to fail.
3160 SetRemoteDescriptionAnswerExpectError(kPushDownTDFailed, answer_with_gice);
3161 }
3162
3163 // This test verifies the ice protocol type at initiator of the call
3164 // if ICE RFC5245 is supported in answer.
3165 TEST_F(WebRtcSessionTest, TestInitiatorIceInAnswer) {
3166 Init();
3167 mediastream_signaling_.SendAudioVideoStream1();
3168 SessionDescriptionInterface* offer = CreateOffer();
3169 SessionDescriptionInterface* answer = CreateRemoteAnswer(offer);
3170 SetLocalDescriptionWithoutError(offer);
3171
3172 SetRemoteDescriptionWithoutError(answer);
3173 VerifyTransportType("audio", cricket::ICEPROTO_RFC5245);
3174 VerifyTransportType("video", cricket::ICEPROTO_RFC5245);
3175 }
3176
3177 // This test verifies the ice protocol type at receiver side of the call if
3178 // receiver decides to use ice RFC 5245.
3179 TEST_F(WebRtcSessionTest, TestReceiverIceInOffer) {
3180 Init();
3181 mediastream_signaling_.SendAudioVideoStream1();
3182 SessionDescriptionInterface* offer = CreateOffer();
3183 SetRemoteDescriptionWithoutError(offer);
3184 SessionDescriptionInterface* answer = CreateAnswer(NULL);
3185 SetLocalDescriptionWithoutError(answer);
3186 VerifyTransportType("audio", cricket::ICEPROTO_RFC5245);
3187 VerifyTransportType("video", cricket::ICEPROTO_RFC5245);
3188 }
3189
3190 // Verifing local offer and remote answer have matching m-lines as per RFC 3264. 3126 // Verifing local offer and remote answer have matching m-lines as per RFC 3264.
3191 TEST_F(WebRtcSessionTest, TestIncorrectMLinesInRemoteAnswer) { 3127 TEST_F(WebRtcSessionTest, TestIncorrectMLinesInRemoteAnswer) {
3192 Init(); 3128 Init();
3193 mediastream_signaling_.SendAudioVideoStream1(); 3129 mediastream_signaling_.SendAudioVideoStream1();
3194 SessionDescriptionInterface* offer = CreateOffer(); 3130 SessionDescriptionInterface* offer = CreateOffer();
3195 SetLocalDescriptionWithoutError(offer); 3131 SetLocalDescriptionWithoutError(offer);
3196 rtc::scoped_ptr<SessionDescriptionInterface> answer( 3132 rtc::scoped_ptr<SessionDescriptionInterface> answer(
3197 CreateRemoteAnswer(session_->local_description())); 3133 CreateRemoteAnswer(session_->local_description()));
3198 3134
3199 cricket::SessionDescription* answer_copy = answer->description()->Copy(); 3135 cricket::SessionDescription* answer_copy = answer->description()->Copy();
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
3400 3336
3401 mediastream_signaling_.SendAudioVideoStream2(); 3337 mediastream_signaling_.SendAudioVideoStream2();
3402 SessionDescriptionInterface* answer = 3338 SessionDescriptionInterface* answer =
3403 CreateRemoteAnswer(session_->local_description()); 3339 CreateRemoteAnswer(session_->local_description());
3404 SetRemoteDescriptionAnswerExpectError("ERROR_CONTENT", answer); 3340 SetRemoteDescriptionAnswerExpectError("ERROR_CONTENT", answer);
3405 } 3341 }
3406 3342
3407 // Runs the loopback call test with BUNDLE and STUN disabled. 3343 // Runs the loopback call test with BUNDLE and STUN disabled.
3408 TEST_F(WebRtcSessionTest, TestIceStatesBasic) { 3344 TEST_F(WebRtcSessionTest, TestIceStatesBasic) {
3409 // Lets try with only UDP ports. 3345 // Lets try with only UDP ports.
3410 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | 3346 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
3411 cricket::PORTALLOCATOR_DISABLE_TCP |
3412 cricket::PORTALLOCATOR_DISABLE_STUN | 3347 cricket::PORTALLOCATOR_DISABLE_STUN |
3413 cricket::PORTALLOCATOR_DISABLE_RELAY); 3348 cricket::PORTALLOCATOR_DISABLE_RELAY);
3414 TestLoopbackCall(); 3349 TestLoopbackCall();
3415 } 3350 }
3416 3351
3417 TEST_F(WebRtcSessionTest, TestIceStatesBasicIPv6) { 3352 TEST_F(WebRtcSessionTest, TestIceStatesBasicIPv6) {
3418 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | 3353 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
3419 cricket::PORTALLOCATOR_DISABLE_TCP |
3420 cricket::PORTALLOCATOR_DISABLE_STUN | 3354 cricket::PORTALLOCATOR_DISABLE_STUN |
3421 cricket::PORTALLOCATOR_ENABLE_IPV6 | 3355 cricket::PORTALLOCATOR_ENABLE_IPV6 |
3422 cricket::PORTALLOCATOR_DISABLE_RELAY); 3356 cricket::PORTALLOCATOR_DISABLE_RELAY);
3423 3357
3424 // best connection is IPv6 since it has higher network preference. 3358 // best connection is IPv6 since it has higher network preference.
3425 LoopbackNetworkConfiguration config; 3359 LoopbackNetworkConfiguration config;
3426 config.test_ipv6_network_ = true; 3360 config.test_ipv6_network_ = true;
3427 config.best_connection_after_initial_ice_converged_ = 3361 config.best_connection_after_initial_ice_converged_ =
3428 LoopbackNetworkConfiguration::ExpectedBestConnection(0, 1); 3362 LoopbackNetworkConfiguration::ExpectedBestConnection(0, 1);
3429 3363
3430 TestLoopbackCall(config); 3364 TestLoopbackCall(config);
3431 } 3365 }
3432 3366
3433 // Runs the loopback call test with BUNDLE and STUN enabled. 3367 // Runs the loopback call test with BUNDLE and STUN enabled.
3434 TEST_F(WebRtcSessionTest, TestIceStatesBundle) { 3368 TEST_F(WebRtcSessionTest, TestIceStatesBundle) {
3435 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | 3369 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
3436 cricket::PORTALLOCATOR_DISABLE_TCP | 3370 cricket::PORTALLOCATOR_DISABLE_RELAY);
3437 cricket::PORTALLOCATOR_DISABLE_RELAY);
3438 TestLoopbackCall(); 3371 TestLoopbackCall();
3439 } 3372 }
3440 3373
3441 TEST_F(WebRtcSessionTest, SetSdpFailedOnSessionError) { 3374 TEST_F(WebRtcSessionTest, SetSdpFailedOnSessionError) {
3442 Init(); 3375 Init();
3443 cricket::MediaSessionOptions options; 3376 cricket::MediaSessionOptions options;
3444 options.recv_video = true; 3377 options.recv_video = true;
3445 3378
3446 cricket::BaseSession::Error error_code = cricket::BaseSession::ERROR_CONTENT; 3379 cricket::BaseSession::Error error_code = cricket::BaseSession::ERROR_CONTENT;
3447 std::string error_code_str = "ERROR_CONTENT"; 3380 std::string error_code_str = "ERROR_CONTENT";
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
3944 // terminated. The offer creation may or may not have succeeded, but we 3877 // terminated. The offer creation may or may not have succeeded, but we
3945 // must have received a notification which, so the only invalid state 3878 // must have received a notification which, so the only invalid state
3946 // is kInit. 3879 // is kInit.
3947 EXPECT_NE(WebRtcSessionCreateSDPObserverForTest::kInit, o->state()); 3880 EXPECT_NE(WebRtcSessionCreateSDPObserverForTest::kInit, o->state());
3948 } 3881 }
3949 } 3882 }
3950 3883
3951 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 3884 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
3952 // currently fails because upon disconnection and reconnection OnIceComplete is 3885 // currently fails because upon disconnection and reconnection OnIceComplete is
3953 // called more than once without returning to IceGatheringGathering. 3886 // 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