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

Unified Diff: webrtc/p2p/base/transportcontroller_unittest.cc

Issue 1369773003: Add a continual_gathering_policy in PeerConnection RTCConfiguration (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Rebase to master Created 5 years, 3 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 | « webrtc/p2p/base/transportcontroller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/transportcontroller_unittest.cc
diff --git a/webrtc/p2p/base/transportcontroller_unittest.cc b/webrtc/p2p/base/transportcontroller_unittest.cc
index c78352591b09ca49ce4ed39582bd538a010a4093..23e4dc80671d2e873f9e213afda28175e2113ce4 100644
--- a/webrtc/p2p/base/transportcontroller_unittest.cc
+++ b/webrtc/p2p/base/transportcontroller_unittest.cc
@@ -134,6 +134,14 @@ class TransportControllerTest : public testing::Test,
channel2->SetConnectionCount(1);
}
+ cricket::IceConfig CreateIceConfig(int receiving_timeout_ms,
+ bool gather_continually) {
+ cricket::IceConfig config;
+ config.receiving_timeout_ms = receiving_timeout_ms;
+ config.gather_continually = gather_continually;
+ return config;
+ }
+
protected:
void OnConnectionState(IceConnectionState state) {
if (!signaling_thread_->IsCurrent()) {
@@ -189,17 +197,19 @@ class TransportControllerTest : public testing::Test,
bool signaled_on_non_signaling_thread_ = false;
};
-TEST_F(TransportControllerTest, TestSetIceReceivingTimeout) {
+TEST_F(TransportControllerTest, TestSetIceConfig) {
FakeTransportChannel* channel1 = CreateChannel("audio", 1);
ASSERT_NE(nullptr, channel1);
- transport_controller_->SetIceConnectionReceivingTimeout(1000);
+ transport_controller_->SetIceConfig(CreateIceConfig(1000, true));
EXPECT_EQ(1000, channel1->receiving_timeout());
+ EXPECT_TRUE(channel1->gather_continually());
// Test that value stored in controller is applied to new channels.
FakeTransportChannel* channel2 = CreateChannel("video", 1);
ASSERT_NE(nullptr, channel2);
EXPECT_EQ(1000, channel2->receiving_timeout());
+ EXPECT_TRUE(channel2->gather_continually());
}
TEST_F(TransportControllerTest, TestSetSslMaxProtocolVersion) {
« no previous file with comments | « webrtc/p2p/base/transportcontroller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698