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

Side by Side Diff: webrtc/p2p/base/transport_unittest.cc

Issue 1844133002: Remove the dead code in Transport::ConnectChannels (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Small modification of null check Created 4 years, 8 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
« no previous file with comments | « webrtc/p2p/base/transport.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2011 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 EXPECT_EQ(cricket::ICEMODE_LITE, channel_->remote_ice_mode()); 212 EXPECT_EQ(cricket::ICEMODE_LITE, channel_->remote_ice_mode());
213 } 213 }
214 214
215 TEST_F(TransportTest, TestGetStats) { 215 TEST_F(TransportTest, TestGetStats) {
216 EXPECT_TRUE(SetupChannel()); 216 EXPECT_TRUE(SetupChannel());
217 cricket::TransportStats stats; 217 cricket::TransportStats stats;
218 EXPECT_TRUE(transport_->GetStats(&stats)); 218 EXPECT_TRUE(transport_->GetStats(&stats));
219 // Note that this tests the behavior of a FakeTransportChannel. 219 // Note that this tests the behavior of a FakeTransportChannel.
220 ASSERT_EQ(1U, stats.channel_stats.size()); 220 ASSERT_EQ(1U, stats.channel_stats.size());
221 EXPECT_EQ(1, stats.channel_stats[0].component); 221 EXPECT_EQ(1, stats.channel_stats[0].component);
222 // Set local transport description for FakeTransport before connecting.
223 TransportDescription faketransport_desc(
224 std::vector<std::string>(),
225 rtc::CreateRandomString(cricket::ICE_UFRAG_LENGTH),
226 rtc::CreateRandomString(cricket::ICE_PWD_LENGTH), cricket::ICEMODE_FULL,
227 cricket::CONNECTIONROLE_NONE, nullptr);
228 transport_->SetLocalTransportDescription(faketransport_desc,
229 cricket::CA_OFFER, nullptr);
222 transport_->ConnectChannels(); 230 transport_->ConnectChannels();
223 EXPECT_TRUE(transport_->GetStats(&stats)); 231 EXPECT_TRUE(transport_->GetStats(&stats));
224 ASSERT_EQ(1U, stats.channel_stats.size()); 232 ASSERT_EQ(1U, stats.channel_stats.size());
225 EXPECT_EQ(1, stats.channel_stats[0].component); 233 EXPECT_EQ(1, stats.channel_stats[0].component);
226 } 234 }
227 235
OLDNEW
« no previous file with comments | « webrtc/p2p/base/transport.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698