Chromium Code Reviews| Index: net/nqe/network_quality_estimator_unittest.cc |
| diff --git a/net/nqe/network_quality_estimator_unittest.cc b/net/nqe/network_quality_estimator_unittest.cc |
| index 52d5bf7b81646c31193df6016d0e377591a97eda..bdc04b2b97667aeb609bb92ca9ef8c5ed25ded3b 100644 |
| --- a/net/nqe/network_quality_estimator_unittest.cc |
| +++ b/net/nqe/network_quality_estimator_unittest.cc |
| @@ -1678,4 +1678,22 @@ TEST(NetworkQualityEstimatorTest, MAYBE_RecordAccuracy) { |
| } |
| } |
| +// Tests if the effective connection type is converted correctly to a |
|
bengr
2016/06/20 14:44:16
if -> that
tbansal1
2016/06/20 20:16:35
Done.
|
| +// descriptive string name, and vice-versa. |
| +TEST(NetworkQualityEstimatorTest, NameConnectionTypeConversion) { |
| + for (size_t i = 0; |
| + i < NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_LAST; ++i) { |
| + const NetworkQualityEstimator::EffectiveConnectionType |
| + effective_connection_type = |
| + static_cast<NetworkQualityEstimator::EffectiveConnectionType>(i); |
| + std::string connection_type_name = |
| + std::string(NetworkQualityEstimator::GetNameForEffectiveConnectionType( |
| + effective_connection_type)); |
| + EXPECT_FALSE(connection_type_name.empty()); |
| + EXPECT_EQ(effective_connection_type, |
| + NetworkQualityEstimator::GetEffectiveConnectionTypeForName( |
| + connection_type_name)); |
| + } |
| +} |
| + |
| } // namespace net |