OLD | NEW |
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 FakeIdentityService* dtls_service = NULL; | 267 FakeIdentityService* dtls_service = NULL; |
268 bool dtls; | 268 bool dtls; |
269 if (FindConstraint(constraints, | 269 if (FindConstraint(constraints, |
270 webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 270 webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
271 &dtls, | 271 &dtls, |
272 NULL) && dtls) { | 272 NULL) && dtls) { |
273 dtls_service = new FakeIdentityService(); | 273 dtls_service = new FakeIdentityService(); |
274 } | 274 } |
275 pc_ = pc_factory_->CreatePeerConnection(servers, constraints, | 275 pc_ = pc_factory_->CreatePeerConnection(servers, constraints, |
276 port_allocator_factory_.get(), | 276 port_allocator_factory_.get(), |
277 dtls_service, | 277 dtls_service, rtc::KT_DEFAULT, |
278 &observer_); | 278 &observer_); |
279 ASSERT_TRUE(pc_.get() != NULL); | 279 ASSERT_TRUE(pc_.get() != NULL); |
280 observer_.SetPeerConnectionInterface(pc_.get()); | 280 observer_.SetPeerConnectionInterface(pc_.get()); |
281 EXPECT_EQ(PeerConnectionInterface::kStable, observer_.state_); | 281 EXPECT_EQ(PeerConnectionInterface::kStable, observer_.state_); |
282 } | 282 } |
283 | 283 |
284 void CreatePeerConnectionWithDifferentConfigurations() { | 284 void CreatePeerConnectionWithDifferentConfigurations() { |
285 CreatePeerConnection(kStunAddressOnly, "", NULL); | 285 CreatePeerConnection(kStunAddressOnly, "", NULL); |
286 EXPECT_EQ(1u, port_allocator_factory_->stun_configs().size()); | 286 EXPECT_EQ(1u, port_allocator_factory_->stun_configs().size()); |
287 EXPECT_EQ(0u, port_allocator_factory_->turn_configs().size()); | 287 EXPECT_EQ(0u, port_allocator_factory_->turn_configs().size()); |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1217 sdp, NULL); | 1217 sdp, NULL); |
1218 EXPECT_FALSE(DoSetLocalDescription(local_offer)); | 1218 EXPECT_FALSE(DoSetLocalDescription(local_offer)); |
1219 } | 1219 } |
1220 | 1220 |
1221 // Test that GetStats can still be called after PeerConnection::Close. | 1221 // Test that GetStats can still be called after PeerConnection::Close. |
1222 TEST_F(PeerConnectionInterfaceTest, CloseAndGetStats) { | 1222 TEST_F(PeerConnectionInterfaceTest, CloseAndGetStats) { |
1223 InitiateCall(); | 1223 InitiateCall(); |
1224 pc_->Close(); | 1224 pc_->Close(); |
1225 DoGetStats(NULL); | 1225 DoGetStats(NULL); |
1226 } | 1226 } |
OLD | NEW |