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

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: ps 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') | net/nqe/event_creator.h » ('J')
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..aae803033c19f1a1afac7b128f2bce1fa3f05256 100644
--- a/chrome/browser/android/net/external_estimate_provider_android_unittest.cc
+++ b/chrome/browser/android/net/external_estimate_provider_android_unittest.cc
@@ -8,9 +8,11 @@
#include <utility>
#include "base/at_exit.h"
+#include "base/memory/ptr_util.h"
RyanSturm 2017/01/10 16:22:37 Not seeing where ptr_util is used.
tbansal1 2017/01/10 18:27:52 Done.
#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 +41,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 +95,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') | net/nqe/event_creator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698