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

Unified Diff: talk/app/webrtc/peerconnectioninterface_unittest.cc

Issue 1669993003: Remove deprecated PeerConnectionObserver::OnStateChange and OnIceComplete (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed tests. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/app/webrtc/peerconnectioninterface.h ('k') | talk/app/webrtc/webrtcsession.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/peerconnectioninterface_unittest.cc
diff --git a/talk/app/webrtc/peerconnectioninterface_unittest.cc b/talk/app/webrtc/peerconnectioninterface_unittest.cc
index 2388e71c04de7560ab9aaa6a0ba656fa1af6ba89..c29718fe3493fdd151f4e356719fb0e8fb7e20c5 100644
--- a/talk/app/webrtc/peerconnectioninterface_unittest.cc
+++ b/talk/app/webrtc/peerconnectioninterface_unittest.cc
@@ -443,30 +443,29 @@ class MockPeerConnectionObserver : public PeerConnectionObserver {
return remote_streams_->find(label);
}
StreamCollectionInterface* remote_streams() const { return remote_streams_; }
- virtual void OnAddStream(MediaStreamInterface* stream) {
+ void OnAddStream(MediaStreamInterface* stream) override {
last_added_stream_ = stream;
remote_streams_->AddStream(stream);
}
- virtual void OnRemoveStream(MediaStreamInterface* stream) {
+ void OnRemoveStream(MediaStreamInterface* stream) override {
last_removed_stream_ = stream;
remote_streams_->RemoveStream(stream);
}
- virtual void OnRenegotiationNeeded() {
- renegotiation_needed_ = true;
- }
- virtual void OnDataChannel(DataChannelInterface* data_channel) {
+ void OnRenegotiationNeeded() override { renegotiation_needed_ = true; }
+ void OnDataChannel(DataChannelInterface* data_channel) override {
last_datachannel_ = data_channel;
}
- virtual void OnIceConnectionChange(
- PeerConnectionInterface::IceConnectionState new_state) {
+ void OnIceConnectionChange(
+ PeerConnectionInterface::IceConnectionState new_state) override {
EXPECT_EQ(pc_->ice_connection_state(), new_state);
}
- virtual void OnIceGatheringChange(
- PeerConnectionInterface::IceGatheringState new_state) {
+ void OnIceGatheringChange(
+ PeerConnectionInterface::IceGatheringState new_state) override {
EXPECT_EQ(pc_->ice_gathering_state(), new_state);
+ ice_complete_ = new_state == PeerConnectionInterface::kIceGatheringComplete;
}
- virtual void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) {
+ void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) override {
EXPECT_NE(PeerConnectionInterface::kIceGatheringNew,
pc_->ice_gathering_state());
@@ -477,15 +476,6 @@ class MockPeerConnectionObserver : public PeerConnectionObserver {
candidate->sdp_mline_index(), sdp, NULL));
EXPECT_TRUE(last_candidate_.get() != NULL);
}
- // TODO(bemasc): Remove this once callers transition to OnSignalingChange.
- virtual void OnIceComplete() {
- ice_complete_ = true;
- // OnIceGatheringChange(IceGatheringCompleted) and OnIceComplete() should
- // be called approximately simultaneously. For ease of testing, this
- // check additionally requires that they be called in the above order.
- EXPECT_EQ(PeerConnectionInterface::kIceGatheringComplete,
- pc_->ice_gathering_state());
- }
// Returns the label of the last added stream.
// Empty string if no stream have been added.
« no previous file with comments | « talk/app/webrtc/peerconnectioninterface.h ('k') | talk/app/webrtc/webrtcsession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698