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

Side by Side Diff: net/nqe/network_quality_estimator_unittest.cc

Issue 2064763003: Add function that converts string connection type to ECT (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
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
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
OLDNEW
« net/nqe/network_quality_estimator.h ('K') | « net/nqe/network_quality_estimator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698