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

Unified Diff: chrome/browser/android/net/external_estimate_provider_android_unittest.cc

Issue 2593243003: Add network quality change events to net log (Closed)
Patch Set: rebased 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
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/net/external_estimate_provider_android_unittest.cc
diff --git a/chrome/browser/android/net/external_estimate_provider_android_unittest.cc b/chrome/browser/android/net/external_estimate_provider_android_unittest.cc
index bdaadca498eda42d1f4debd4168d34c6c4ae04ea..eca05bbb849db7b780f8a8aa7ab79dcb31a9679b 100644
--- a/chrome/browser/android/net/external_estimate_provider_android_unittest.cc
+++ b/chrome/browser/android/net/external_estimate_provider_android_unittest.cc
@@ -11,6 +11,7 @@
#include "base/test/histogram_tester.h"
#include "base/time/time.h"
#include "content/public/test/test_browser_thread_bundle.h"
+#include "net/log/test_net_log.h"
#include "net/nqe/network_quality_estimator.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -39,9 +40,11 @@ class TestNetworkQualityEstimator : public net::NetworkQualityEstimator {
TestNetworkQualityEstimator(
std::unique_ptr<chrome::android::ExternalEstimateProviderAndroid>
external_estimate_provider,
- const std::map<std::string, std::string>& variation_params)
+ const std::map<std::string, std::string>& variation_params,
+ net::NetLog* net_log)
: NetworkQualityEstimator(std::move(external_estimate_provider),
- variation_params),
+ variation_params,
+ net_log),
notified_(false) {}
~TestNetworkQualityEstimator() override {}
@@ -91,9 +94,10 @@ TEST(ExternalEstimateProviderAndroidTest, DelegateTest) {
external_estimate_provider.reset(new TestExternalEstimateProviderAndroid());
TestExternalEstimateProviderAndroid* ptr = external_estimate_provider.get();
+ net::TestNetLog net_log;
std::map<std::string, std::string> variation_params;
TestNetworkQualityEstimator network_quality_estimator(
- std::move(external_estimate_provider), variation_params);
+ std::move(external_estimate_provider), variation_params, &net_log);
ptr->NotifyUpdatedEstimateAvailable();
EXPECT_TRUE(network_quality_estimator.notified());
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698