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

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

Issue 1263663002: Remove GICE. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix most PortTests 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #define MAYBE_SKIP_TEST(feature) \ 63 #define MAYBE_SKIP_TEST(feature) \
64 if (!(feature())) { \ 64 if (!(feature())) { \
65 LOG(LS_INFO) << "Feature disabled... skipping"; \ 65 LOG(LS_INFO) << "Feature disabled... skipping"; \
66 return; \ 66 return; \
67 } 67 }
68 68
69 using cricket::BaseSession; 69 using cricket::BaseSession;
70 using cricket::DF_PLAY; 70 using cricket::DF_PLAY;
71 using cricket::DF_SEND; 71 using cricket::DF_SEND;
72 using cricket::FakeVoiceMediaChannel; 72 using cricket::FakeVoiceMediaChannel;
73 using cricket::NS_GINGLE_P2P;
74 using cricket::NS_JINGLE_ICE_UDP;
75 using cricket::TransportInfo; 73 using cricket::TransportInfo;
76 using rtc::SocketAddress; 74 using rtc::SocketAddress;
77 using rtc::scoped_ptr; 75 using rtc::scoped_ptr;
78 using rtc::Thread; 76 using rtc::Thread;
79 using webrtc::CreateSessionDescription; 77 using webrtc::CreateSessionDescription;
80 using webrtc::CreateSessionDescriptionObserver; 78 using webrtc::CreateSessionDescriptionObserver;
81 using webrtc::CreateSessionDescriptionRequest; 79 using webrtc::CreateSessionDescriptionRequest;
82 using webrtc::DTLSIdentityRequestObserver; 80 using webrtc::DTLSIdentityRequestObserver;
83 using webrtc::DTLSIdentityServiceInterface; 81 using webrtc::DTLSIdentityServiceInterface;
84 using webrtc::FakeConstraints; 82 using webrtc::FakeConstraints;
(...skipping 245 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 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionDisconnected, 1128 EXPECT_EQ_WAIT(PeerConnectionInterface::kIceConnectionDisconnected,
1134 observer_.ice_connection_state_, 1129 observer_.ice_connection_state_,
1135 kIceCandidatesTimeout + port_timeout); 1130 kIceCandidatesTimeout + port_timeout);
1136 } 1131 }
1137 1132
1138 void TestLoopbackCall() { 1133 void TestLoopbackCall() {
1139 LoopbackNetworkConfiguration config; 1134 LoopbackNetworkConfiguration config;
1140 TestLoopbackCall(config); 1135 TestLoopbackCall(config);
1141 } 1136 }
1142 1137
1143 void VerifyTransportType(const std::string& content_name,
1144 cricket::TransportProtocol protocol) {
1145 const cricket::Transport* transport = session_->GetTransport(content_name);
1146 ASSERT_TRUE(transport != NULL);
1147 EXPECT_EQ(protocol, transport->protocol());
1148 }
1149
1150 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory. 1138 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory.
1151 void AddCNCodecs() { 1139 void AddCNCodecs() {
1152 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1, 0); 1140 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1, 0);
1153 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1, 0); 1141 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1, 0);
1154 1142
1155 // Add kCNCodec for dtmf test. 1143 // Add kCNCodec for dtmf test.
1156 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();; 1144 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();;
1157 codecs.push_back(kCNCodec1); 1145 codecs.push_back(kCNCodec1);
1158 codecs.push_back(kCNCodec2); 1146 codecs.push_back(kCNCodec2);
1159 media_engine_->SetAudioCodecs(codecs); 1147 media_engine_->SetAudioCodecs(codecs);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 } 1209 }
1222 1210
1223 void ConfigureAllocatorWithTurn() { 1211 void ConfigureAllocatorWithTurn() {
1224 cricket::RelayServerConfig relay_server(cricket::RELAY_TURN); 1212 cricket::RelayServerConfig relay_server(cricket::RELAY_TURN);
1225 cricket::RelayCredentials credentials(kTurnUsername, kTurnPassword); 1213 cricket::RelayCredentials credentials(kTurnUsername, kTurnPassword);
1226 relay_server.credentials = credentials; 1214 relay_server.credentials = credentials;
1227 relay_server.ports.push_back(cricket::ProtocolAddress( 1215 relay_server.ports.push_back(cricket::ProtocolAddress(
1228 kTurnUdpIntAddr, cricket::PROTO_UDP, false)); 1216 kTurnUdpIntAddr, cricket::PROTO_UDP, false));
1229 allocator_->AddRelay(relay_server); 1217 allocator_->AddRelay(relay_server);
1230 allocator_->set_step_delay(cricket::kMinimumStepDelay); 1218 allocator_->set_step_delay(cricket::kMinimumStepDelay);
1231 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | 1219 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP);
1232 cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG);
1233 } 1220 }
1234 1221
1235 cricket::FakeMediaEngine* media_engine_; 1222 cricket::FakeMediaEngine* media_engine_;
1236 cricket::FakeDataEngine* data_engine_; 1223 cricket::FakeDataEngine* data_engine_;
1237 cricket::FakeDeviceManager* device_manager_; 1224 cricket::FakeDeviceManager* device_manager_;
1238 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; 1225 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
1239 rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_; 1226 rtc::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_;
1240 rtc::scoped_ptr<rtc::SSLIdentity> identity_; 1227 rtc::scoped_ptr<rtc::SSLIdentity> identity_;
1241 rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_; 1228 rtc::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_;
1242 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_; 1229 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_;
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2528 RemoveIceUfragPwdLines(offer.get(), &sdp); 2515 RemoveIceUfragPwdLines(offer.get(), &sdp);
2529 SessionDescriptionInterface* modified_offer = 2516 SessionDescriptionInterface* modified_offer =
2530 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2517 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2531 SetRemoteDescriptionOfferExpectError(kSdpWithoutIceUfragPwd, modified_offer); 2518 SetRemoteDescriptionOfferExpectError(kSdpWithoutIceUfragPwd, modified_offer);
2532 } 2519 }
2533 2520
2534 // This test verifies that setLocalDescription fails if local offer has 2521 // This test verifies that setLocalDescription fails if local offer has
2535 // too short ice ufrag and pwd strings. 2522 // too short ice ufrag and pwd strings.
2536 TEST_F(WebRtcSessionTest, TestSetLocalDescriptionInvalidIceCredentials) { 2523 TEST_F(WebRtcSessionTest, TestSetLocalDescriptionInvalidIceCredentials) {
2537 Init(); 2524 Init();
2538 tdesc_factory_->set_protocol(cricket::ICEPROTO_RFC5245);
2539 mediastream_signaling_.SendAudioVideoStream1(); 2525 mediastream_signaling_.SendAudioVideoStream1();
2540 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer()); 2526 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateOffer());
2541 2527
2542 std::string sdp; 2528 std::string sdp;
2543 // Modifying ice ufrag and pwd in local offer with strings smaller than the 2529 // Modifying ice ufrag and pwd in local offer with strings smaller than the
2544 // recommended values of 4 and 22 bytes respectively. 2530 // recommended values of 4 and 22 bytes respectively.
2545 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp); 2531 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp);
2546 SessionDescriptionInterface* modified_offer = 2532 SessionDescriptionInterface* modified_offer =
2547 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2533 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2548 std::string error; 2534 std::string error;
2549 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error)); 2535 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error));
2550 2536
2551 // Test with string greater than 256. 2537 // Test with string greater than 256.
2552 sdp.clear(); 2538 sdp.clear();
2553 ModifyIceUfragPwdLines(offer.get(), kTooLongIceUfragPwd, kTooLongIceUfragPwd, 2539 ModifyIceUfragPwdLines(offer.get(), kTooLongIceUfragPwd, kTooLongIceUfragPwd,
2554 &sdp); 2540 &sdp);
2555 modified_offer = CreateSessionDescription(JsepSessionDescription::kOffer, sdp, 2541 modified_offer = CreateSessionDescription(JsepSessionDescription::kOffer, sdp,
2556 NULL); 2542 NULL);
2557 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error)); 2543 EXPECT_FALSE(session_->SetLocalDescription(modified_offer, &error));
2558 } 2544 }
2559 2545
2560 // This test verifies that setRemoteDescription fails if remote offer has 2546 // This test verifies that setRemoteDescription fails if remote offer has
2561 // too short ice ufrag and pwd strings. 2547 // too short ice ufrag and pwd strings.
2562 TEST_F(WebRtcSessionTest, TestSetRemoteDescriptionInvalidIceCredentials) { 2548 TEST_F(WebRtcSessionTest, TestSetRemoteDescriptionInvalidIceCredentials) {
2563 Init(); 2549 Init();
2564 tdesc_factory_->set_protocol(cricket::ICEPROTO_RFC5245);
2565 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer()); 2550 rtc::scoped_ptr<SessionDescriptionInterface> offer(CreateRemoteOffer());
2566 std::string sdp; 2551 std::string sdp;
2567 // Modifying ice ufrag and pwd in remote offer with strings smaller than the 2552 // Modifying ice ufrag and pwd in remote offer with strings smaller than the
2568 // recommended values of 4 and 22 bytes respectively. 2553 // recommended values of 4 and 22 bytes respectively.
2569 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp); 2554 ModifyIceUfragPwdLines(offer.get(), "ice", "icepwd", &sdp);
2570 SessionDescriptionInterface* modified_offer = 2555 SessionDescriptionInterface* modified_offer =
2571 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL); 2556 CreateSessionDescription(JsepSessionDescription::kOffer, sdp, NULL);
2572 std::string error; 2557 std::string error;
2573 EXPECT_FALSE(session_->SetRemoteDescription(modified_offer, &error)); 2558 EXPECT_FALSE(session_->SetRemoteDescription(modified_offer, &error));
2574 2559
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
3071 EXPECT_FALSE(session_->initiator()); 3056 EXPECT_FALSE(session_->initiator());
3072 SessionDescriptionInterface* offer = CreateRemoteOffer(); 3057 SessionDescriptionInterface* offer = CreateRemoteOffer();
3073 SetRemoteDescriptionWithoutError(offer); 3058 SetRemoteDescriptionWithoutError(offer);
3074 SessionDescriptionInterface* answer = CreateAnswer(NULL); 3059 SessionDescriptionInterface* answer = CreateAnswer(NULL);
3075 3060
3076 EXPECT_FALSE(session_->initiator()); 3061 EXPECT_FALSE(session_->initiator());
3077 SetLocalDescriptionWithoutError(answer); 3062 SetLocalDescriptionWithoutError(answer);
3078 EXPECT_FALSE(session_->initiator()); 3063 EXPECT_FALSE(session_->initiator());
3079 } 3064 }
3080 3065
3081 // This test verifies the ice protocol type at initiator of the call
3082 // if |a=ice-options:google-ice| is present in answer.
3083 TEST_F(WebRtcSessionTest, TestInitiatorGIceInAnswer) {
3084 Init();
3085 mediastream_signaling_.SendAudioVideoStream1();
3086 SessionDescriptionInterface* offer = CreateOffer();
3087 rtc::scoped_ptr<SessionDescriptionInterface> answer(
3088 CreateRemoteAnswer(offer));
3089 SetLocalDescriptionWithoutError(offer);
3090 std::string sdp;
3091 EXPECT_TRUE(answer->ToString(&sdp));
3092 // Adding ice-options to the session level.
3093 InjectAfter("t=0 0\r\n",
3094 "a=ice-options:google-ice\r\n",
3095 &sdp);
3096 SessionDescriptionInterface* answer_with_gice =
3097 CreateSessionDescription(JsepSessionDescription::kAnswer, sdp, NULL);
3098 // Default offer is ICEPROTO_RFC5245, so we expect responder with
3099 // only gice to fail.
3100 SetRemoteDescriptionAnswerExpectError(kPushDownTDFailed, answer_with_gice);
3101 }
3102
3103 // This test verifies the ice protocol type at initiator of the call
3104 // if ICE RFC5245 is supported in answer.
3105 TEST_F(WebRtcSessionTest, TestInitiatorIceInAnswer) {
3106 Init();
3107 mediastream_signaling_.SendAudioVideoStream1();
3108 SessionDescriptionInterface* offer = CreateOffer();
3109 SessionDescriptionInterface* answer = CreateRemoteAnswer(offer);
3110 SetLocalDescriptionWithoutError(offer);
3111
3112 SetRemoteDescriptionWithoutError(answer);
3113 VerifyTransportType("audio", cricket::ICEPROTO_RFC5245);
3114 VerifyTransportType("video", cricket::ICEPROTO_RFC5245);
3115 }
3116
3117 // This test verifies the ice protocol type at receiver side of the call if
3118 // receiver decides to use ice RFC 5245.
3119 TEST_F(WebRtcSessionTest, TestReceiverIceInOffer) {
3120 Init();
3121 mediastream_signaling_.SendAudioVideoStream1();
3122 SessionDescriptionInterface* offer = CreateOffer();
3123 SetRemoteDescriptionWithoutError(offer);
3124 SessionDescriptionInterface* answer = CreateAnswer(NULL);
3125 SetLocalDescriptionWithoutError(answer);
3126 VerifyTransportType("audio", cricket::ICEPROTO_RFC5245);
3127 VerifyTransportType("video", cricket::ICEPROTO_RFC5245);
3128 }
3129
3130 // Verifing local offer and remote answer have matching m-lines as per RFC 3264. 3066 // Verifing local offer and remote answer have matching m-lines as per RFC 3264.
3131 TEST_F(WebRtcSessionTest, TestIncorrectMLinesInRemoteAnswer) { 3067 TEST_F(WebRtcSessionTest, TestIncorrectMLinesInRemoteAnswer) {
3132 Init(); 3068 Init();
3133 mediastream_signaling_.SendAudioVideoStream1(); 3069 mediastream_signaling_.SendAudioVideoStream1();
3134 SessionDescriptionInterface* offer = CreateOffer(); 3070 SessionDescriptionInterface* offer = CreateOffer();
3135 SetLocalDescriptionWithoutError(offer); 3071 SetLocalDescriptionWithoutError(offer);
3136 rtc::scoped_ptr<SessionDescriptionInterface> answer( 3072 rtc::scoped_ptr<SessionDescriptionInterface> answer(
3137 CreateRemoteAnswer(session_->local_description())); 3073 CreateRemoteAnswer(session_->local_description()));
3138 3074
3139 cricket::SessionDescription* answer_copy = answer->description()->Copy(); 3075 cricket::SessionDescription* answer_copy = answer->description()->Copy();
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
3340 3276
3341 mediastream_signaling_.SendAudioVideoStream2(); 3277 mediastream_signaling_.SendAudioVideoStream2();
3342 SessionDescriptionInterface* answer = 3278 SessionDescriptionInterface* answer =
3343 CreateRemoteAnswer(session_->local_description()); 3279 CreateRemoteAnswer(session_->local_description());
3344 SetRemoteDescriptionAnswerExpectError("ERROR_CONTENT", answer); 3280 SetRemoteDescriptionAnswerExpectError("ERROR_CONTENT", answer);
3345 } 3281 }
3346 3282
3347 // Runs the loopback call test with BUNDLE and STUN disabled. 3283 // Runs the loopback call test with BUNDLE and STUN disabled.
3348 TEST_F(WebRtcSessionTest, TestIceStatesBasic) { 3284 TEST_F(WebRtcSessionTest, TestIceStatesBasic) {
3349 // Lets try with only UDP ports. 3285 // Lets try with only UDP ports.
3350 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | 3286 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
3351 cricket::PORTALLOCATOR_DISABLE_TCP |
3352 cricket::PORTALLOCATOR_DISABLE_STUN | 3287 cricket::PORTALLOCATOR_DISABLE_STUN |
3353 cricket::PORTALLOCATOR_DISABLE_RELAY); 3288 cricket::PORTALLOCATOR_DISABLE_RELAY);
3354 TestLoopbackCall(); 3289 TestLoopbackCall();
3355 } 3290 }
3356 3291
3357 TEST_F(WebRtcSessionTest, TestIceStatesBasicIPv6) { 3292 TEST_F(WebRtcSessionTest, TestIceStatesBasicIPv6) {
3358 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | 3293 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
3359 cricket::PORTALLOCATOR_DISABLE_TCP |
3360 cricket::PORTALLOCATOR_DISABLE_STUN | 3294 cricket::PORTALLOCATOR_DISABLE_STUN |
3361 cricket::PORTALLOCATOR_ENABLE_IPV6 | 3295 cricket::PORTALLOCATOR_ENABLE_IPV6 |
3362 cricket::PORTALLOCATOR_DISABLE_RELAY); 3296 cricket::PORTALLOCATOR_DISABLE_RELAY);
3363 3297
3364 // best connection is IPv6 since it has higher network preference. 3298 // best connection is IPv6 since it has higher network preference.
3365 LoopbackNetworkConfiguration config; 3299 LoopbackNetworkConfiguration config;
3366 config.test_ipv6_network_ = true; 3300 config.test_ipv6_network_ = true;
3367 config.best_connection_after_initial_ice_converged_ = 3301 config.best_connection_after_initial_ice_converged_ =
3368 LoopbackNetworkConfiguration::ExpectedBestConnection(0, 1); 3302 LoopbackNetworkConfiguration::ExpectedBestConnection(0, 1);
3369 3303
3370 TestLoopbackCall(config); 3304 TestLoopbackCall(config);
3371 } 3305 }
3372 3306
3373 // Runs the loopback call test with BUNDLE and STUN enabled. 3307 // Runs the loopback call test with BUNDLE and STUN enabled.
3374 TEST_F(WebRtcSessionTest, TestIceStatesBundle) { 3308 TEST_F(WebRtcSessionTest, TestIceStatesBundle) {
3375 allocator_->set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | 3309 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
3376 cricket::PORTALLOCATOR_DISABLE_TCP | 3310 cricket::PORTALLOCATOR_DISABLE_RELAY);
3377 cricket::PORTALLOCATOR_DISABLE_RELAY);
3378 TestLoopbackCall(); 3311 TestLoopbackCall();
3379 } 3312 }
3380 3313
3381 TEST_F(WebRtcSessionTest, SetSdpFailedOnSessionError) { 3314 TEST_F(WebRtcSessionTest, SetSdpFailedOnSessionError) {
3382 Init(); 3315 Init();
3383 cricket::MediaSessionOptions options; 3316 cricket::MediaSessionOptions options;
3384 options.recv_video = true; 3317 options.recv_video = true;
3385 3318
3386 cricket::BaseSession::Error error_code = cricket::BaseSession::ERROR_CONTENT; 3319 cricket::BaseSession::Error error_code = cricket::BaseSession::ERROR_CONTENT;
3387 std::string error_code_str = "ERROR_CONTENT"; 3320 std::string error_code_str = "ERROR_CONTENT";
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
3884 // terminated. The offer creation may or may not have succeeded, but we 3817 // terminated. The offer creation may or may not have succeeded, but we
3885 // must have received a notification which, so the only invalid state 3818 // must have received a notification which, so the only invalid state
3886 // is kInit. 3819 // is kInit.
3887 EXPECT_NE(WebRtcSessionCreateSDPObserverForTest::kInit, o->state()); 3820 EXPECT_NE(WebRtcSessionCreateSDPObserverForTest::kInit, o->state());
3888 } 3821 }
3889 } 3822 }
3890 3823
3891 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 3824 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
3892 // currently fails because upon disconnection and reconnection OnIceComplete is 3825 // currently fails because upon disconnection and reconnection OnIceComplete is
3893 // called more than once without returning to IceGatheringGathering. 3826 // called more than once without returning to IceGatheringGathering.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698