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

Unified Diff: chrome/browser/ui/webui/options/preferences_browsertest.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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/ui/webui/options/preferences_browsertest.cc
diff --git a/chrome/browser/ui/webui/options/preferences_browsertest.cc b/chrome/browser/ui/webui/options/preferences_browsertest.cc
index de784ef7aaf099f27efdab530a0bfe17390f0c5a..644089592319c64e8e93d3d17535fcbed85fdff1 100644
--- a/chrome/browser/ui/webui/options/preferences_browsertest.cc
+++ b/chrome/browser/ui/webui/options/preferences_browsertest.cc
@@ -252,14 +252,14 @@ void PreferencesBrowserTest::VerifyPref(const base::DictionaryValue* prefs,
EXPECT_FALSE(dict->HasKey("controlledBy"));
if (disabled)
- VerifyKeyValue(*dict, "disabled", base::FundamentalValue(true));
+ VerifyKeyValue(*dict, "disabled", base::Value(true));
else if (dict->HasKey("disabled"))
- VerifyKeyValue(*dict, "disabled", base::FundamentalValue(false));
+ VerifyKeyValue(*dict, "disabled", base::Value(false));
if (uncommitted)
- VerifyKeyValue(*dict, "uncommitted", base::FundamentalValue(true));
+ VerifyKeyValue(*dict, "uncommitted", base::Value(true));
else if (dict->HasKey("uncommitted"))
- VerifyKeyValue(*dict, "uncommitted", base::FundamentalValue(false));
+ VerifyKeyValue(*dict, "uncommitted", base::Value(false));
}
void PreferencesBrowserTest::VerifyObservedPref(const std::string& json,
@@ -352,7 +352,7 @@ void PreferencesBrowserTest::SetPref(const std::string& name,
const base::Value* value,
bool commit,
std::string* observed_json) {
- std::unique_ptr<base::Value> commit_ptr(new base::FundamentalValue(commit));
+ std::unique_ptr<base::Value> commit_ptr(new base::Value(commit));
std::stringstream javascript;
javascript << "testEnv.runAndReply(function() {"
<< " Preferences.set" << type << "Pref("
@@ -386,7 +386,7 @@ void PreferencesBrowserTest::VerifyClearPref(const std::string& name,
else
ExpectNoCommit(name);
std::string commit_json;
- base::JSONWriter::Write(base::FundamentalValue(commit), &commit_json);
+ base::JSONWriter::Write(base::Value(commit), &commit_json);
std::stringstream javascript;
javascript << "testEnv.runAndReply(function() {"
<< " Preferences.clearPref("
@@ -458,13 +458,13 @@ void PreferencesBrowserTest::UseDefaultTestPrefs(bool includeListPref) {
types_.push_back("Boolean");
pref_names_.push_back(prefs::kAlternateErrorPagesEnabled);
policy_names_.push_back(policy::key::kAlternateErrorPagesEnabled);
- non_default_values_.push_back(new base::FundamentalValue(false));
+ non_default_values_.push_back(new base::Value(false));
// Integer pref.
types_.push_back("Integer");
pref_names_.push_back(prefs::kRestoreOnStartup);
policy_names_.push_back(policy::key::kRestoreOnStartup);
- non_default_values_.push_back(new base::FundamentalValue(4));
+ non_default_values_.push_back(new base::Value(4));
// List pref.
if (includeListPref) {
@@ -674,7 +674,7 @@ IN_PROC_BROWSER_TEST_F(PreferencesBrowserTest, ChromeOSDeviceFetchPrefs) {
// Boolean pref.
pref_names_.push_back(chromeos::kAccountsPrefAllowGuest);
- default_values_.push_back(new base::FundamentalValue(true));
+ default_values_.push_back(new base::Value(true));
// String pref.
pref_names_.push_back(chromeos::kReleaseChannel);
@@ -745,7 +745,7 @@ IN_PROC_BROWSER_TEST_F(ManagedPreferencesBrowserTest,
// Boolean pref.
pref_names_.push_back(chromeos::kAccountsPrefAllowGuest);
- non_default_values_.push_back(new base::FundamentalValue(false));
+ non_default_values_.push_back(new base::Value(false));
decorated_non_default_values.push_back(
non_default_values_.back()->DeepCopy());
@@ -939,12 +939,12 @@ class ProxyPreferencesBrowserTest : public PreferencesBrowserTest {
IN_PROC_BROWSER_TEST_F(ProxyPreferencesBrowserTest, ChromeOSInitializeProxy) {
// Boolean pref.
pref_names_.push_back(chromeos::proxy_cros_settings_parser::kProxySingle);
- non_default_values_.push_back(new base::FundamentalValue(true));
+ non_default_values_.push_back(new base::Value(true));
// Integer prefs.
pref_names_.push_back(
chromeos::proxy_cros_settings_parser::kProxySingleHttpPort);
- non_default_values_.push_back(new base::FundamentalValue(8080));
+ non_default_values_.push_back(new base::Value(8080));
// String pref.
pref_names_.push_back(chromeos::proxy_cros_settings_parser::kProxySingleHttp);
@@ -960,10 +960,10 @@ IN_PROC_BROWSER_TEST_F(ProxyPreferencesBrowserTest, ChromeOSInitializeProxy) {
// Verify that no policy is presented to the UI. This must be verified on the
// kProxyType and the kUseSharedProxies prefs.
pref_names_.push_back(chromeos::proxy_cros_settings_parser::kProxyType);
- non_default_values_.push_back(new base::FundamentalValue(2));
+ non_default_values_.push_back(new base::Value(2));
pref_names_.push_back(proxy_config::prefs::kUseSharedProxies);
- non_default_values_.push_back(new base::FundamentalValue(false));
+ non_default_values_.push_back(new base::Value(false));
std::string observed_json;
SetupJavaScriptTestEnvironment(pref_names_, &observed_json);
@@ -978,7 +978,7 @@ IN_PROC_BROWSER_TEST_F(ProxyPreferencesBrowserTest, ONCPolicy) {
// Verify that per-network policy is presented to the UI. This must be
// verified on the kProxyType.
pref_names_.push_back(chromeos::proxy_cros_settings_parser::kProxyType);
- non_default_values_.push_back(new base::FundamentalValue(3));
+ non_default_values_.push_back(new base::Value(3));
std::string observed_json;
SetupJavaScriptTestEnvironment(pref_names_, &observed_json);
@@ -990,7 +990,7 @@ IN_PROC_BROWSER_TEST_F(ProxyPreferencesBrowserTest, ONCPolicy) {
pref_names_.clear();
non_default_values_.clear();
pref_names_.push_back(proxy_config::prefs::kUseSharedProxies);
- non_default_values_.push_back(new base::FundamentalValue(false));
+ non_default_values_.push_back(new base::Value(false));
SetupJavaScriptTestEnvironment(pref_names_, &observed_json);
VerifyObservedPrefs(
@@ -1004,7 +1004,7 @@ IN_PROC_BROWSER_TEST_F(ProxyPreferencesBrowserTest, DeviceONCPolicy) {
// Verify that the policy is presented to the UI. This verification must be
// done on the kProxyType pref.
pref_names_.push_back(chromeos::proxy_cros_settings_parser::kProxyType);
- non_default_values_.push_back(new base::FundamentalValue(3));
+ non_default_values_.push_back(new base::Value(3));
std::string observed_json;
SetupJavaScriptTestEnvironment(pref_names_, &observed_json);
@@ -1016,7 +1016,7 @@ IN_PROC_BROWSER_TEST_F(ProxyPreferencesBrowserTest, DeviceONCPolicy) {
pref_names_.clear();
non_default_values_.clear();
pref_names_.push_back(proxy_config::prefs::kUseSharedProxies);
- non_default_values_.push_back(new base::FundamentalValue(false));
+ non_default_values_.push_back(new base::Value(false));
SetupJavaScriptTestEnvironment(pref_names_, &observed_json);
VerifyObservedPrefs(
@@ -1034,11 +1034,11 @@ IN_PROC_BROWSER_TEST_F(ProxyPreferencesBrowserTest, UserProxyPolicy) {
// Verify that the policy is presented to the UI. This verification must be
// done on the kProxyType pref.
pref_names_.push_back(chromeos::proxy_cros_settings_parser::kProxyType);
- non_default_values_.push_back(new base::FundamentalValue(3));
+ non_default_values_.push_back(new base::Value(3));
// Verify that 'use-shared-proxies' is controlled by the policy.
pref_names_.push_back(proxy_config::prefs::kUseSharedProxies);
- non_default_values_.push_back(new base::FundamentalValue(false));
+ non_default_values_.push_back(new base::Value(false));
std::string observed_json;
SetupJavaScriptTestEnvironment(pref_names_, &observed_json);
@@ -1053,7 +1053,7 @@ IN_PROC_BROWSER_TEST_F(ProxyPreferencesBrowserTest, ChromeOSSetProxy) {
ASSERT_NO_FATAL_FAILURE(SetupJavaScriptTestEnvironment(pref_names_, NULL));
SetProxyPref(chromeos::proxy_cros_settings_parser::kProxySingleHttpPort,
- base::FundamentalValue(123));
+ base::Value(123));
SetProxyPref(chromeos::proxy_cros_settings_parser::kProxySingleHttp,
base::StringValue("www.adomain.xy"));
@@ -1068,7 +1068,7 @@ IN_PROC_BROWSER_TEST_F(ProxyPreferencesBrowserTest, ChromeOSProxyDefaultPorts) {
// Set to manual, per scheme proxy.
SetProxyPref(chromeos::proxy_cros_settings_parser::kProxySingle,
- base::FundamentalValue(false));
+ base::Value(false));
// Set hosts but no ports.
SetProxyPref(chromeos::proxy_cros_settings_parser::kProxyHttpUrl,
@@ -1087,13 +1087,13 @@ IN_PROC_BROWSER_TEST_F(ProxyPreferencesBrowserTest, ChromeOSProxyDefaultPorts) {
// Set and verify the ports.
SetProxyPref(chromeos::proxy_cros_settings_parser::kProxyHttpPort,
- base::FundamentalValue(1));
+ base::Value(1));
SetProxyPref(chromeos::proxy_cros_settings_parser::kProxyHttpsPort,
- base::FundamentalValue(2));
+ base::Value(2));
SetProxyPref(chromeos::proxy_cros_settings_parser::kProxyFtpPort,
- base::FundamentalValue(3));
+ base::Value(3));
SetProxyPref(chromeos::proxy_cros_settings_parser::kProxySocksPort,
- base::FundamentalValue(4));
+ base::Value(4));
VerifyCurrentProxyServer(
"http=a.com:1;https=4.3.2.1:2;ftp=c.com:3;socks=socks4://d.com:4",

Powered by Google App Engine
This is Rietveld 408576698