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

Unified Diff: chrome/browser/ui/webui/options/chromeos/shared_options_browsertest.cc

Issue 944593002: ChromeOS: Update browser option UI for automatic timezone detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed SharedOptionsTest. Created 5 years, 10 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 | « chrome/browser/ui/webui/options/chromeos/date_time_options_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/chromeos/shared_options_browsertest.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/shared_options_browsertest.cc b/chrome/browser/ui/webui/options/chromeos/shared_options_browsertest.cc
index df7f7d18b290d89bf1bf071c8950460b153fff7f..d51fd41deaaf985a424d6efcc65668fefbb8df42 100644
--- a/chrome/browser/ui/webui/options/chromeos/shared_options_browsertest.cc
+++ b/chrome/browser/ui/webui/options/chromeos/shared_options_browsertest.cc
@@ -118,11 +118,17 @@ class SharedOptionsTest : public LoginManagerTest {
browser->tab_strip_model()->GetActiveWebContents();
for (size_t i = 0; i < sizeof(kPrefTests) / sizeof(kPrefTests[0]); i++) {
- CheckPreference(contents,
- kPrefTests[i].pref_name,
- !is_owner && kPrefTests[i].owner_only,
- !is_owner && kPrefTests[i].indicator ? "owner" :
- std::string());
+ bool disabled = !is_owner && kPrefTests[i].owner_only;
+ if (strcmp(kPrefTests[i].pref_name, kSystemTimezone) == 0) {
+ disabled = ProfileHelper::Get()
+ ->GetProfileByUserUnsafe(user)
+ ->GetPrefs()
+ ->GetBoolean(prefs::kResolveTimezoneByGeolocation);
+ }
+
+ CheckPreference(
+ contents, kPrefTests[i].pref_name, disabled,
+ !is_owner && kPrefTests[i].indicator ? "owner" : std::string());
}
CheckBanner(contents, is_primary);
CheckSharedSections(contents, is_primary);
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/date_time_options_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698