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

Unified Diff: webrtc/api/webrtcsession_unittest.cc

Issue 2124283003: Fixing inconsistency with behavior of `ClearGettingPorts`. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing test that tried to enable continual gathering in the middle of a session. Created 4 years, 4 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 | « no previous file | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/webrtcsession_unittest.cc
diff --git a/webrtc/api/webrtcsession_unittest.cc b/webrtc/api/webrtcsession_unittest.cc
index c0d8a3bbdfe17ee7a11cbeab172e16aae0d56851..6c0170e70414e9dc501d730802a509c02f683dc8 100644
--- a/webrtc/api/webrtcsession_unittest.cc
+++ b/webrtc/api/webrtcsession_unittest.cc
@@ -2258,6 +2258,10 @@ TEST_F(WebRtcSessionTest,
TestLocalCandidatesAddedAndRemovedIfGatherContinually) {
AddInterface(rtc::SocketAddress(kClientAddrHost1, kClientAddrPort));
Init();
+ // Enable Continual Gathering.
+ cricket::IceConfig config;
+ config.continual_gathering_policy = cricket::GATHER_CONTINUALLY;
+ session_->SetIceConfig(config);
SendAudioVideoStream1();
CreateAndSetRemoteOfferAndLocalAnswer();
@@ -2267,7 +2271,8 @@ TEST_F(WebRtcSessionTest,
ASSERT_TRUE(candidates != NULL);
EXPECT_EQ(0u, candidates->count());
- EXPECT_TRUE_WAIT(observer_.oncandidatesready_, kIceCandidatesTimeout);
+ // Since we're using continual gathering, we won't get "gathering done".
+ EXPECT_EQ_WAIT(2u, candidates->count(), kIceCandidatesTimeout);
local_desc = session_->local_description();
candidates = local_desc->candidates(kMediaContentIndex0);
@@ -2291,10 +2296,6 @@ TEST_F(WebRtcSessionTest,
candidates = local_desc->candidates(kMediaContentIndex0);
size_t num_local_candidates = candidates->count();
- // Enable Continual Gathering
- cricket::IceConfig config;
- config.continual_gathering_policy = cricket::GATHER_CONTINUALLY;
- session_->SetIceConfig(config);
// Bring down the network interface to trigger candidate removals.
RemoveInterface(rtc::SocketAddress(kClientAddrHost1, kClientAddrPort));
// Verify that all local candidates are removed.
« no previous file with comments | « no previous file | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698