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

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

Issue 2849823003: ChromeOS: implement per-user time zone preferences. (Closed)
Patch Set: Try remove g_browser_process check Created 3 years, 7 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/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 3cc4c0bd3a3eae192dec96717a6bb00424cbef22..d712bddde10f94894d88e8549952f901194a0c7d 100644
--- a/chrome/browser/ui/webui/options/preferences_browsertest.cc
+++ b/chrome/browser/ui/webui/options/preferences_browsertest.cc
@@ -696,37 +696,6 @@ IN_PROC_BROWSER_TEST_F(PreferencesBrowserTest, ChromeOSDeviceFetchPrefs) {
true, false);
}
-// Verifies that initializing the JavaScript Preferences class fires the correct
-// notifications in JavaScript for non-privileged pref values handled by the
-// CoreChromeOSOptionsHandler class.
-IN_PROC_BROWSER_TEST_F(PreferencesBrowserTest,
- ChromeOSDeviceFetchNonPrivilegedPrefs) {
- std::vector<std::unique_ptr<base::Value>> decorated_non_default_values;
- std::string observed_json;
-
- // Non-privileged string pref.
- pref_names_.push_back(chromeos::kSystemTimezone);
- default_values_.push_back(
- base::MakeUnique<base::Value>("America/Los_Angeles"));
- non_default_values_.push_back(
- base::MakeUnique<base::Value>("America/New_York"));
- decorated_non_default_values.push_back(
- non_default_values_.back()->CreateDeepCopy());
-
- // Verify notifications when default values are in effect.
- SetupJavaScriptTestEnvironment(pref_names_, &observed_json);
- VerifyObservedPrefs(observed_json, pref_names_, default_values_,
- std::string(), false, false);
-
- chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get();
- cros_settings->Set(pref_names_[0], *non_default_values_[0]);
-
- // Verify notifications when non-default values are in effect.
- SetupJavaScriptTestEnvironment(pref_names_, &observed_json);
- VerifyObservedPrefs(observed_json, pref_names_, decorated_non_default_values,
- std::string(), false, false);
-}
-
class ManagedPreferencesBrowserTest : public PreferencesBrowserTest {
protected:
// PreferencesBrowserTest implementation:
@@ -795,30 +764,6 @@ IN_PROC_BROWSER_TEST_F(ManagedPreferencesBrowserTest,
"policy", true, false);
}
-// Verifies that initializing the JavaScript Preferences class fires the correct
-// notifications in JavaScript for non-privileged pref values handled by the
-// CoreChromeOSOptionsHandler class for a managed device.
-IN_PROC_BROWSER_TEST_F(ManagedPreferencesBrowserTest,
- ChromeOSDeviceFetchNonPrivilegedPrefs) {
- std::vector<std::unique_ptr<base::Value>> decorated_non_default_values;
- std::string observed_json;
-
- // Non-privileged string pref.
- pref_names_.push_back(chromeos::kSystemTimezone);
- non_default_values_.push_back(
- base::MakeUnique<base::Value>("America/New_York"));
- decorated_non_default_values.push_back(
- non_default_values_.back()->CreateDeepCopy());
-
- // Verify notifications when mandatory values are in effect.
- chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get();
- cros_settings->Set(pref_names_[0], *non_default_values_[0]);
-
- SetupJavaScriptTestEnvironment(pref_names_, &observed_json);
- VerifyObservedPrefs(observed_json, pref_names_, decorated_non_default_values,
- std::string(), false, false);
-}
-
namespace {
const char* kUserProfilePath = "user_profile";

Powered by Google App Engine
This is Rietveld 408576698