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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 static const char kStunIceServerWithIPv4Address[] = "stun:1.2.3.4:1234"; | 56 static const char kStunIceServerWithIPv4Address[] = "stun:1.2.3.4:1234"; |
57 static const char kStunIceServerWithIPv4AddressWithoutPort[] = "stun:1.2.3.4"; | 57 static const char kStunIceServerWithIPv4AddressWithoutPort[] = "stun:1.2.3.4"; |
58 static const char kStunIceServerWithIPv6Address[] = "stun:[2401:fa00:4::]:1234"; | 58 static const char kStunIceServerWithIPv6Address[] = "stun:[2401:fa00:4::]:1234"; |
59 static const char kStunIceServerWithIPv6AddressWithoutPort[] = | 59 static const char kStunIceServerWithIPv6AddressWithoutPort[] = |
60 "stun:[2401:fa00:4::]"; | 60 "stun:[2401:fa00:4::]"; |
61 static const char kTurnIceServerWithIPv6Address[] = | 61 static const char kTurnIceServerWithIPv6Address[] = |
62 "turn:test@[2401:fa00:4::]:1234"; | 62 "turn:test@[2401:fa00:4::]:1234"; |
63 | 63 |
64 class NullPeerConnectionObserver : public PeerConnectionObserver { | 64 class NullPeerConnectionObserver : public PeerConnectionObserver { |
65 public: | 65 public: |
| 66 // We need these using declarations because there are two versions of each of |
| 67 // the below methods and we only override one of them. |
| 68 // TODO(deadbeef): Remove once there's only one version of the methods. |
| 69 using PeerConnectionObserver::OnAddStream; |
| 70 using PeerConnectionObserver::OnRemoveStream; |
| 71 using PeerConnectionObserver::OnDataChannel; |
| 72 |
66 virtual ~NullPeerConnectionObserver() = default; | 73 virtual ~NullPeerConnectionObserver() = default; |
67 virtual void OnMessage(const std::string& msg) {} | 74 virtual void OnMessage(const std::string& msg) {} |
68 virtual void OnSignalingMessage(const std::string& msg) {} | 75 virtual void OnSignalingMessage(const std::string& msg) {} |
69 virtual void OnSignalingChange( | 76 virtual void OnSignalingChange( |
70 PeerConnectionInterface::SignalingState new_state) {} | 77 PeerConnectionInterface::SignalingState new_state) {} |
71 virtual void OnAddStream(rtc::scoped_refptr<MediaStreamInterface> stream) {} | 78 virtual void OnAddStream(rtc::scoped_refptr<MediaStreamInterface> stream) {} |
72 virtual void OnRemoveStream(rtc::scoped_refptr<MediaStreamInterface> stream) { | 79 virtual void OnRemoveStream(rtc::scoped_refptr<MediaStreamInterface> stream) { |
73 } | 80 } |
74 virtual void OnDataChannel( | 81 virtual void OnDataChannel( |
75 rtc::scoped_refptr<DataChannelInterface> data_channel) {} | 82 rtc::scoped_refptr<DataChannelInterface> data_channel) {} |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 track->set_enabled(false); | 354 track->set_enabled(false); |
348 EXPECT_TRUE(capturer->CaptureFrame()); | 355 EXPECT_TRUE(capturer->CaptureFrame()); |
349 EXPECT_EQ(2, local_renderer.num_rendered_frames()); | 356 EXPECT_EQ(2, local_renderer.num_rendered_frames()); |
350 EXPECT_TRUE(local_renderer.black_frame()); | 357 EXPECT_TRUE(local_renderer.black_frame()); |
351 | 358 |
352 track->set_enabled(true); | 359 track->set_enabled(true); |
353 EXPECT_TRUE(capturer->CaptureFrame()); | 360 EXPECT_TRUE(capturer->CaptureFrame()); |
354 EXPECT_EQ(3, local_renderer.num_rendered_frames()); | 361 EXPECT_EQ(3, local_renderer.num_rendered_frames()); |
355 EXPECT_FALSE(local_renderer.black_frame()); | 362 EXPECT_FALSE(local_renderer.black_frame()); |
356 } | 363 } |
OLD | NEW |