| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |