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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 virtual void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) {} | 80 virtual void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) {} |
81 }; | 81 }; |
82 | 82 |
83 } // namespace | 83 } // namespace |
84 | 84 |
85 class PeerConnectionFactoryTest : public testing::Test { | 85 class PeerConnectionFactoryTest : public testing::Test { |
86 void SetUp() { | 86 void SetUp() { |
87 #ifdef WEBRTC_ANDROID | 87 #ifdef WEBRTC_ANDROID |
88 webrtc::InitializeAndroidObjects(); | 88 webrtc::InitializeAndroidObjects(); |
89 #endif | 89 #endif |
90 factory_ = webrtc::CreatePeerConnectionFactory(rtc::Thread::Current(), | 90 factory_ = webrtc::CreatePeerConnectionFactory( |
91 rtc::Thread::Current(), | 91 rtc::Thread::Current(), rtc::Thread::Current(), rtc::Thread::Current(), |
92 NULL, | 92 nullptr, nullptr, nullptr); |
93 NULL, | |
94 NULL); | |
95 | 93 |
96 ASSERT_TRUE(factory_.get() != NULL); | 94 ASSERT_TRUE(factory_.get() != NULL); |
97 port_allocator_.reset( | 95 port_allocator_.reset( |
98 new cricket::FakePortAllocator(rtc::Thread::Current(), nullptr)); | 96 new cricket::FakePortAllocator(rtc::Thread::Current(), nullptr)); |
99 raw_port_allocator_ = port_allocator_.get(); | 97 raw_port_allocator_ = port_allocator_.get(); |
100 } | 98 } |
101 | 99 |
102 protected: | 100 protected: |
103 void VerifyStunServers(cricket::ServerAddresses stun_servers) { | 101 void VerifyStunServers(cricket::ServerAddresses stun_servers) { |
104 EXPECT_EQ(stun_servers, raw_port_allocator_->stun_servers()); | 102 EXPECT_EQ(stun_servers, raw_port_allocator_->stun_servers()); |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 track->set_enabled(false); | 346 track->set_enabled(false); |
349 EXPECT_TRUE(capturer->CaptureFrame()); | 347 EXPECT_TRUE(capturer->CaptureFrame()); |
350 EXPECT_EQ(2, local_renderer.num_rendered_frames()); | 348 EXPECT_EQ(2, local_renderer.num_rendered_frames()); |
351 EXPECT_TRUE(local_renderer.black_frame()); | 349 EXPECT_TRUE(local_renderer.black_frame()); |
352 | 350 |
353 track->set_enabled(true); | 351 track->set_enabled(true); |
354 EXPECT_TRUE(capturer->CaptureFrame()); | 352 EXPECT_TRUE(capturer->CaptureFrame()); |
355 EXPECT_EQ(3, local_renderer.num_rendered_frames()); | 353 EXPECT_EQ(3, local_renderer.num_rendered_frames()); |
356 EXPECT_FALSE(local_renderer.black_frame()); | 354 EXPECT_FALSE(local_renderer.black_frame()); |
357 } | 355 } |
OLD | NEW |