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

Unified Diff: net/nqe/network_quality_estimator_unittest.cc

Issue 2648353003: Add effective connection type to throughput mapping (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
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 cd543d8051be484509e6c3e3d1e2733d1f85b208..c30b74c84926b4d04c2828ed8d845794588c9116 100644
--- a/net/nqe/network_quality_estimator_unittest.cc
+++ b/net/nqe/network_quality_estimator_unittest.cc
@@ -2660,13 +2660,12 @@ TEST(NetworkQualityEstimatorTest, OnPrefsRead) {
EXPECT_EQ(base::TimeDelta::FromMilliseconds(1500),
rtt_observer.last_rtt(
NETWORK_QUALITY_OBSERVATION_SOURCE_TRANSPORT_CACHED_ESTIMATE));
- EXPECT_EQ(0u, throughput_observer.observations().size());
+ EXPECT_EQ(1u, throughput_observer.observations().size());
EXPECT_EQ(base::TimeDelta::FromMilliseconds(1800),
rtt_throughput_observer.http_rtt());
EXPECT_EQ(base::TimeDelta::FromMilliseconds(1500),
rtt_throughput_observer.transport_rtt());
- EXPECT_EQ(nqe::internal::kInvalidThroughput,
- rtt_throughput_observer.downstream_throughput_kbps());
+ EXPECT_EQ(75, rtt_throughput_observer.downstream_throughput_kbps());
EXPECT_LE(
1u,
effective_connection_type_observer.effective_connection_types().size());
@@ -2688,13 +2687,12 @@ TEST(NetworkQualityEstimatorTest, OnPrefsRead) {
EXPECT_EQ(base::TimeDelta::FromMilliseconds(3000),
rtt_observer.last_rtt(
NETWORK_QUALITY_OBSERVATION_SOURCE_TRANSPORT_CACHED_ESTIMATE));
- EXPECT_EQ(0u, throughput_observer.observations().size());
+ EXPECT_EQ(2U, throughput_observer.observations().size());
EXPECT_EQ(base::TimeDelta::FromMilliseconds(3600),
rtt_throughput_observer.http_rtt());
EXPECT_EQ(base::TimeDelta::FromMilliseconds(3000),
rtt_throughput_observer.transport_rtt());
- EXPECT_EQ(nqe::internal::kInvalidThroughput,
- rtt_throughput_observer.downstream_throughput_kbps());
+ EXPECT_EQ(40, rtt_throughput_observer.downstream_throughput_kbps());
EXPECT_LE(
2u,
effective_connection_type_observer.effective_connection_types().size());
« net/nqe/network_quality_estimator_params.cc ('K') | « net/nqe/network_quality_estimator_params.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698