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

Side by Side Diff: webrtc/pc/peerconnectionfactory_unittest.cc

Issue 2660223002: Add override declarations to PeerConnectionObserver subclasses, and delete obsolete methods. (Closed)
Patch Set: Created 3 years, 10 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 * 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 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. 67 // the below methods and we only override one of them.
68 // TODO(deadbeef): Remove once there's only one version of the methods. 68 // TODO(deadbeef): Remove once there's only one version of the methods.
69 using PeerConnectionObserver::OnAddStream; 69 using PeerConnectionObserver::OnAddStream;
70 using PeerConnectionObserver::OnRemoveStream; 70 using PeerConnectionObserver::OnRemoveStream;
71 using PeerConnectionObserver::OnDataChannel; 71 using PeerConnectionObserver::OnDataChannel;
72 72
73 virtual ~NullPeerConnectionObserver() = default; 73 virtual ~NullPeerConnectionObserver() = default;
74 virtual void OnMessage(const std::string& msg) {} 74 void OnSignalingChange(
75 virtual void OnSignalingMessage(const std::string& msg) {} 75 PeerConnectionInterface::SignalingState new_state) override {}
76 virtual void OnSignalingChange( 76 void OnAddStream(rtc::scoped_refptr<MediaStreamInterface> stream) override {}
77 PeerConnectionInterface::SignalingState new_state) {} 77 void OnRemoveStream(
78 virtual void OnAddStream(rtc::scoped_refptr<MediaStreamInterface> stream) {} 78 rtc::scoped_refptr<MediaStreamInterface> stream) override {}
79 virtual void OnRemoveStream(rtc::scoped_refptr<MediaStreamInterface> stream) { 79 void OnDataChannel(
80 } 80 rtc::scoped_refptr<DataChannelInterface> data_channel) override {}
81 virtual void OnDataChannel( 81 void OnRenegotiationNeeded() override {}
82 rtc::scoped_refptr<DataChannelInterface> data_channel) {} 82 void OnIceConnectionChange(
83 virtual void OnRenegotiationNeeded() {} 83 PeerConnectionInterface::IceConnectionState new_state) override {}
84 virtual void OnIceConnectionChange( 84 void OnIceGatheringChange(
85 PeerConnectionInterface::IceConnectionState new_state) {} 85 PeerConnectionInterface::IceGatheringState new_state) override {}
86 virtual void OnIceGatheringChange( 86 void OnIceCandidate(
87 PeerConnectionInterface::IceGatheringState new_state) {} 87 const webrtc::IceCandidateInterface* candidate) override {}
88 virtual void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) {}
89 }; 88 };
90 89
91 } // namespace 90 } // namespace
92 91
93 class PeerConnectionFactoryTest : public testing::Test { 92 class PeerConnectionFactoryTest : public testing::Test {
94 void SetUp() { 93 void SetUp() {
95 #ifdef WEBRTC_ANDROID 94 #ifdef WEBRTC_ANDROID
96 webrtc::InitializeAndroidObjects(); 95 webrtc::InitializeAndroidObjects();
97 #endif 96 #endif
98 factory_ = webrtc::CreatePeerConnectionFactory( 97 factory_ = webrtc::CreatePeerConnectionFactory(
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 track->set_enabled(false); 353 track->set_enabled(false);
355 EXPECT_TRUE(capturer->CaptureFrame()); 354 EXPECT_TRUE(capturer->CaptureFrame());
356 EXPECT_EQ(2, local_renderer.num_rendered_frames()); 355 EXPECT_EQ(2, local_renderer.num_rendered_frames());
357 EXPECT_TRUE(local_renderer.black_frame()); 356 EXPECT_TRUE(local_renderer.black_frame());
358 357
359 track->set_enabled(true); 358 track->set_enabled(true);
360 EXPECT_TRUE(capturer->CaptureFrame()); 359 EXPECT_TRUE(capturer->CaptureFrame());
361 EXPECT_EQ(3, local_renderer.num_rendered_frames()); 360 EXPECT_EQ(3, local_renderer.num_rendered_frames());
362 EXPECT_FALSE(local_renderer.black_frame()); 361 EXPECT_FALSE(local_renderer.black_frame());
363 } 362 }
OLDNEW
« no previous file with comments | « webrtc/examples/peerconnection/client/conductor.h ('k') | webrtc/pc/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698