Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/nqe/network_quality_estimator.h" | 5 #include "net/nqe/network_quality_estimator.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1671 sign_suffix_with_one_sample + "." + interval_value + ".60_140", | 1671 sign_suffix_with_one_sample + "." + interval_value + ".60_140", |
| 1672 diff, 1); | 1672 diff, 1); |
| 1673 histogram_tester.ExpectTotalCount( | 1673 histogram_tester.ExpectTotalCount( |
| 1674 "NQE.Accuracy.TransportRTT.EstimatedObservedDiff." + | 1674 "NQE.Accuracy.TransportRTT.EstimatedObservedDiff." + |
| 1675 sign_suffix_with_zero_samples + "." + interval_value + ".60_140", | 1675 sign_suffix_with_zero_samples + "." + interval_value + ".60_140", |
| 1676 0); | 1676 0); |
| 1677 } | 1677 } |
| 1678 } | 1678 } |
| 1679 } | 1679 } |
| 1680 | 1680 |
| 1681 // 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.
| |
| 1682 // descriptive string name, and vice-versa. | |
| 1683 TEST(NetworkQualityEstimatorTest, NameConnectionTypeConversion) { | |
| 1684 for (size_t i = 0; | |
| 1685 i < NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_LAST; ++i) { | |
| 1686 const NetworkQualityEstimator::EffectiveConnectionType | |
| 1687 effective_connection_type = | |
| 1688 static_cast<NetworkQualityEstimator::EffectiveConnectionType>(i); | |
| 1689 std::string connection_type_name = | |
| 1690 std::string(NetworkQualityEstimator::GetNameForEffectiveConnectionType( | |
| 1691 effective_connection_type)); | |
| 1692 EXPECT_FALSE(connection_type_name.empty()); | |
| 1693 EXPECT_EQ(effective_connection_type, | |
| 1694 NetworkQualityEstimator::GetEffectiveConnectionTypeForName( | |
| 1695 connection_type_name)); | |
| 1696 } | |
| 1697 } | |
| 1698 | |
| 1681 } // namespace net | 1699 } // namespace net |
| OLD | NEW |