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

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 2031303003: ChromeOS: enable SystemTimezoneAutomaticDetectionPolicy by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment updated. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 3893 matching lines...) Expand 10 before | Expand all | Expand 10 after
3904 public: 3904 public:
3905 ChromeOSPolicyTest() {} 3905 ChromeOSPolicyTest() {}
3906 3906
3907 void SetUpCommandLine(base::CommandLine* command_line) override { 3907 void SetUpCommandLine(base::CommandLine* command_line) override {
3908 PolicyTest::SetUpCommandLine(command_line); 3908 PolicyTest::SetUpCommandLine(command_line);
3909 command_line->AppendSwitchASCII(chromeos::switches::kLoginUser, 3909 command_line->AppendSwitchASCII(chromeos::switches::kLoginUser,
3910 cryptohome_id1_.id()); 3910 cryptohome_id1_.id());
3911 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "hash"); 3911 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "hash");
3912 command_line->AppendSwitch( 3912 command_line->AppendSwitch(
3913 chromeos::switches::kAllowFailedPolicyFetchForTest); 3913 chromeos::switches::kAllowFailedPolicyFetchForTest);
3914
3915 command_line->AppendSwitch(
3916 chromeos::switches::kEnableSystemTimezoneAutomaticDetectionPolicy);
3917 } 3914 }
3918 3915
3919 protected: 3916 protected:
3920 const AccountId test_account_id1_ = AccountId::FromUserEmail(kTestUser1); 3917 const AccountId test_account_id1_ = AccountId::FromUserEmail(kTestUser1);
3921 const cryptohome::Identification cryptohome_id1_ = 3918 const cryptohome::Identification cryptohome_id1_ =
3922 cryptohome::Identification(test_account_id1_); 3919 cryptohome::Identification(test_account_id1_);
3923 3920
3924 // Logs in |account_id|. 3921 // Logs in |account_id|.
3925 void LogIn(const AccountId& account_id, const std::string& user_id_hash) { 3922 void LogIn(const AccountId& account_id, const std::string& user_id_hash) {
3926 user_manager::UserManager::Get()->UserLoggedIn(account_id, user_id_hash, 3923 user_manager::UserManager::Get()->UserLoggedIn(account_id, user_id_hash,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
4033 4030
4034 SetEmptyPolicy(); 4031 SetEmptyPolicy();
4035 // Policy not set. 4032 // Policy not set.
4036 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); 4033 CheckSystemTimezoneAutomaticDetectionPolicyUnset();
4037 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); 4034 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false));
4038 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); 4035 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests());
4039 } 4036 }
4040 #endif // defined(OS_CHROMEOS) 4037 #endif // defined(OS_CHROMEOS)
4041 4038
4042 } // namespace policy 4039 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698