| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 } | 594 } |
| 595 | 595 |
| 596 std::unique_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store; | 596 std::unique_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store; |
| 597 bool dtls; | 597 bool dtls; |
| 598 if (FindConstraint(constraints, | 598 if (FindConstraint(constraints, |
| 599 webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 599 webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
| 600 &dtls, | 600 &dtls, |
| 601 nullptr) && dtls) { | 601 nullptr) && dtls) { |
| 602 dtls_identity_store.reset(new FakeDtlsIdentityStore()); | 602 dtls_identity_store.reset(new FakeDtlsIdentityStore()); |
| 603 } | 603 } |
| 604 pc_ = pc_factory_->CreatePeerConnection( | 604 pc_ = pc_factory_->CreatePeerConnectionWithStore( |
| 605 config, constraints, std::move(port_allocator), | 605 config, constraints, std::move(port_allocator), |
| 606 std::move(dtls_identity_store), &observer_); | 606 std::move(dtls_identity_store), &observer_); |
| 607 ASSERT_TRUE(pc_.get() != NULL); | 607 ASSERT_TRUE(pc_.get() != NULL); |
| 608 observer_.SetPeerConnectionInterface(pc_.get()); | 608 observer_.SetPeerConnectionInterface(pc_.get()); |
| 609 EXPECT_EQ(PeerConnectionInterface::kStable, observer_.state_); | 609 EXPECT_EQ(PeerConnectionInterface::kStable, observer_.state_); |
| 610 } | 610 } |
| 611 | 611 |
| 612 void CreatePeerConnectionExpectFail(const std::string& uri) { | 612 void CreatePeerConnectionExpectFail(const std::string& uri) { |
| 613 PeerConnectionInterface::RTCConfiguration config; | 613 PeerConnectionInterface::RTCConfiguration config; |
| 614 PeerConnectionInterface::IceServer server; | 614 PeerConnectionInterface::IceServer server; |
| (...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2804 FakeConstraints updated_answer_c; | 2804 FakeConstraints updated_answer_c; |
| 2805 answer_c.SetMandatoryReceiveAudio(false); | 2805 answer_c.SetMandatoryReceiveAudio(false); |
| 2806 answer_c.SetMandatoryReceiveVideo(false); | 2806 answer_c.SetMandatoryReceiveVideo(false); |
| 2807 | 2807 |
| 2808 cricket::MediaSessionOptions updated_answer_options; | 2808 cricket::MediaSessionOptions updated_answer_options; |
| 2809 EXPECT_TRUE( | 2809 EXPECT_TRUE( |
| 2810 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); | 2810 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); |
| 2811 EXPECT_TRUE(updated_answer_options.has_audio()); | 2811 EXPECT_TRUE(updated_answer_options.has_audio()); |
| 2812 EXPECT_TRUE(updated_answer_options.has_video()); | 2812 EXPECT_TRUE(updated_answer_options.has_video()); |
| 2813 } | 2813 } |
| OLD | NEW |