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

Unified Diff: chrome/browser/prefs/pref_functional_browsertest.cc

Issue 1316073005: Update TestPrivacySecurityPrefs to new preference. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_functional_browsertest.cc
diff --git a/chrome/browser/prefs/pref_functional_browsertest.cc b/chrome/browser/prefs/pref_functional_browsertest.cc
index 9ef8ccdd0a28a6dbda834bb099914c29b57247a5..0db5c30c781a8464965246db3af5bf04d65ec73d 100644
--- a/chrome/browser/prefs/pref_functional_browsertest.cc
+++ b/chrome/browser/prefs/pref_functional_browsertest.cc
@@ -6,6 +6,7 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/download/download_prefs.h"
+#include "chrome/browser/net/prediction_options.h"
#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
@@ -204,8 +205,12 @@ IN_PROC_BROWSER_TEST_F(PrefsFunctionalTest, TestHomepagePrefs) {
IN_PROC_BROWSER_TEST_F(PrefsFunctionalTest, PRE_TestPrivacySecurityPrefs) {
PrefService* prefs = browser()->profile()->GetPrefs();
- EXPECT_TRUE(prefs->GetBoolean(prefs::kNetworkPredictionEnabled));
- prefs->SetBoolean(prefs::kNetworkPredictionEnabled, false);
+ EXPECT_NE(chrome_browser_net::NETWORK_PREDICTION_DEFAULT,
Bernhard Bauer 2015/09/14 18:52:41 If this fails, something is _seriously_ wrong 😉 AS
Bence 2015/09/14 21:56:57 Done.
+ chrome_browser_net::NETWORK_PREDICTION_NEVER);
+ EXPECT_EQ(chrome_browser_net::NETWORK_PREDICTION_DEFAULT,
+ prefs->GetInteger(prefs::kNetworkPredictionOptions));
+ prefs->SetInteger(prefs::kNetworkPredictionOptions,
+ chrome_browser_net::NETWORK_PREDICTION_NEVER);
EXPECT_TRUE(prefs->GetBoolean(prefs::kSafeBrowsingEnabled));
prefs->SetBoolean(prefs::kSafeBrowsingEnabled, false);
@@ -221,7 +226,8 @@ IN_PROC_BROWSER_TEST_F(PrefsFunctionalTest, PRE_TestPrivacySecurityPrefs) {
IN_PROC_BROWSER_TEST_F(PrefsFunctionalTest, TestPrivacySecurityPrefs) {
PrefService* prefs = browser()->profile()->GetPrefs();
- EXPECT_FALSE(prefs->GetBoolean(prefs::kNetworkPredictionEnabled));
+ EXPECT_EQ(chrome_browser_net::NETWORK_PREDICTION_NEVER,
+ prefs->GetInteger(prefs::kNetworkPredictionOptions));
EXPECT_FALSE(prefs->GetBoolean(prefs::kSafeBrowsingEnabled));
EXPECT_FALSE(prefs->GetBoolean(prefs::kAlternateErrorPagesEnabled));
EXPECT_FALSE(prefs->GetBoolean(prefs::kSearchSuggestEnabled));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698