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

Unified Diff: chrome/browser/net/nqe/ui_network_quality_estimator_service_browsertest.cc

Issue 2622663002: NetworkQualityEstimator: Enable prefs writing by default (Closed)
Patch Set: Fix moar tests 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: chrome/browser/net/nqe/ui_network_quality_estimator_service_browsertest.cc
diff --git a/chrome/browser/net/nqe/ui_network_quality_estimator_service_browsertest.cc b/chrome/browser/net/nqe/ui_network_quality_estimator_service_browsertest.cc
index 571e4f6cba7c68af48de8eb0d577fec95d4601f1..07611d605f449131ba16d3c22702d6acbd9bf450 100644
--- a/chrome/browser/net/nqe/ui_network_quality_estimator_service_browsertest.cc
+++ b/chrome/browser/net/nqe/ui_network_quality_estimator_service_browsertest.cc
@@ -6,6 +6,7 @@
#include <string>
#include "base/bind.h"
+#include "base/metrics/field_trial.h"
#include "base/run_loop.h"
#include "base/test/histogram_tester.h"
#include "chrome/browser/browser_process.h"
@@ -60,13 +61,13 @@ class UINetworkQualityEstimatorServiceBrowserTest
// Verifies that the network quality prefs are written amd read correctly.
void VerifyWritingReadingPrefs(bool persistent_cache_writing_enabled,
bool persistent_cache_reading_enabled) {
+ variations::testing::ClearAllVariationParams();
std::map<std::string, std::string> variation_params;
- if (persistent_cache_writing_enabled)
- variation_params["persistent_cache_writing_enabled"] = "true";
-
- if (persistent_cache_reading_enabled)
- variation_params["persistent_cache_reading_enabled"] = "true";
+ variation_params["persistent_cache_writing_enabled"] =
+ persistent_cache_writing_enabled ? "true" : "false";
+ variation_params["persistent_cache_reading_enabled"] =
+ persistent_cache_reading_enabled ? "true" : "false";
variations::AssociateVariationParams("NetworkQualityEstimator", "Enabled",
variation_params);
@@ -216,13 +217,6 @@ IN_PROC_BROWSER_TEST_F(UINetworkQualityEstimatorServiceBrowserTest,
nqe_observer_3.effective_connection_type());
}
-// Verify that prefs are not writen when writing of the prefs is not enabled
-// via field trial.
-IN_PROC_BROWSER_TEST_F(UINetworkQualityEstimatorServiceBrowserTest,
- WritingToPrefsDisabled) {
- VerifyWritingReadingPrefs(false, true);
-}
-
// Verify that prefs are not read when reading of the prefs is not enabled
// via field trial.
IN_PROC_BROWSER_TEST_F(UINetworkQualityEstimatorServiceBrowserTest,
« no previous file with comments | « chrome/browser/net/nqe/ui_network_quality_estimator_service.cc ('k') | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698