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

Unified Diff: talk/app/webrtc/webrtcsession_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/webrtcsession.cc ('k') | webrtc/examples/peerconnection/client/conductor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/webrtcsession_unittest.cc
diff --git a/talk/app/webrtc/webrtcsession_unittest.cc b/talk/app/webrtc/webrtcsession_unittest.cc
index c553165f9b57f523e965d3d82efbee3fb37461b2..8d8a78253810826b097ee2e35730415b094162f9 100644
--- a/talk/app/webrtc/webrtcsession_unittest.cc
+++ b/talk/app/webrtc/webrtcsession_unittest.cc
@@ -179,26 +179,21 @@ class MockIceObserver : public webrtc::IceObserver {
ice_gathering_state_(PeerConnectionInterface::kIceGatheringNew) {
}
- virtual void OnIceConnectionChange(
- PeerConnectionInterface::IceConnectionState new_state) {
+ void OnIceConnectionChange(
+ PeerConnectionInterface::IceConnectionState new_state) override {
ice_connection_state_ = new_state;
}
- virtual void OnIceGatheringChange(
- PeerConnectionInterface::IceGatheringState new_state) {
+ void OnIceGatheringChange(
+ PeerConnectionInterface::IceGatheringState new_state) override {
// We can never transition back to "new".
EXPECT_NE(PeerConnectionInterface::kIceGatheringNew, new_state);
ice_gathering_state_ = new_state;
-
- // oncandidatesready_ really means "ICE gathering is complete".
- // This if statement ensures that this value remains correct when we
- // transition from kIceGatheringComplete to kIceGatheringGathering.
- if (new_state == PeerConnectionInterface::kIceGatheringGathering) {
- oncandidatesready_ = false;
- }
+ oncandidatesready_ =
+ new_state == PeerConnectionInterface::kIceGatheringComplete;
}
// Found a new candidate.
- virtual void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) {
+ void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) override {
switch (candidate->sdp_mline_index()) {
case kMediaContentIndex0:
mline_0_candidates_.push_back(candidate->candidate());
@@ -215,18 +210,6 @@ class MockIceObserver : public webrtc::IceObserver {
EXPECT_NE(PeerConnectionInterface::kIceGatheringNew, ice_gathering_state_);
}
- // TODO(bemasc): Remove this once callers transition to OnIceGatheringChange.
- virtual void OnIceComplete() {
- EXPECT_FALSE(oncandidatesready_);
- oncandidatesready_ = 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,
- ice_gathering_state_);
- }
-
bool oncandidatesready_;
std::vector<cricket::Candidate> mline_0_candidates_;
std::vector<cricket::Candidate> mline_1_candidates_;
« no previous file with comments | « talk/app/webrtc/webrtcsession.cc ('k') | webrtc/examples/peerconnection/client/conductor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698