| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" | 5 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsServiceChromeOSTest); | 143 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsServiceChromeOSTest); |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 TEST_F(OwnerSettingsServiceChromeOSTest, SingleSetTest) { | 146 TEST_F(OwnerSettingsServiceChromeOSTest, SingleSetTest) { |
| 147 TestSingleSet(service_, kReleaseChannel, base::StringValue("dev-channel")); | 147 TestSingleSet(service_, kReleaseChannel, base::StringValue("dev-channel")); |
| 148 TestSingleSet(service_, kReleaseChannel, base::StringValue("beta-channel")); | 148 TestSingleSet(service_, kReleaseChannel, base::StringValue("beta-channel")); |
| 149 TestSingleSet(service_, kReleaseChannel, base::StringValue("stable-channel")); | 149 TestSingleSet(service_, kReleaseChannel, base::StringValue("stable-channel")); |
| 150 } | 150 } |
| 151 | 151 |
| 152 TEST_F(OwnerSettingsServiceChromeOSTest, MultipleSetTest) { | 152 TEST_F(OwnerSettingsServiceChromeOSTest, MultipleSetTest) { |
| 153 base::FundamentalValue allow_guest(false); | 153 base::Value allow_guest(false); |
| 154 base::StringValue release_channel("stable-channel"); | 154 base::StringValue release_channel("stable-channel"); |
| 155 base::FundamentalValue show_user_names(true); | 155 base::Value show_user_names(true); |
| 156 | 156 |
| 157 PrefsChecker checker(service_, provider_.get()); | 157 PrefsChecker checker(service_, provider_.get()); |
| 158 | 158 |
| 159 checker.Set(kAccountsPrefAllowGuest, allow_guest); | 159 checker.Set(kAccountsPrefAllowGuest, allow_guest); |
| 160 checker.Set(kReleaseChannel, release_channel); | 160 checker.Set(kReleaseChannel, release_channel); |
| 161 checker.Set(kAccountsPrefShowUserNamesOnSignIn, show_user_names); | 161 checker.Set(kAccountsPrefShowUserNamesOnSignIn, show_user_names); |
| 162 | 162 |
| 163 FlushDeviceSettings(); | 163 FlushDeviceSettings(); |
| 164 checker.Wait(); | 164 checker.Wait(); |
| 165 } | 165 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 InitOwner(AccountId::FromUserEmail(device_policy_.policy_data().username()), | 225 InitOwner(AccountId::FromUserEmail(device_policy_.policy_data().username()), |
| 226 true); | 226 true); |
| 227 ReloadDeviceSettings(); | 227 ReloadDeviceSettings(); |
| 228 ASSERT_TRUE(service_->IsOwner()); | 228 ASSERT_TRUE(service_->IsOwner()); |
| 229 | 229 |
| 230 EXPECT_TRUE(FindInListValue(device_policy_.policy_data().username(), | 230 EXPECT_TRUE(FindInListValue(device_policy_.policy_data().username(), |
| 231 provider_->Get(kAccountsPrefUsers))); | 231 provider_->Get(kAccountsPrefUsers))); |
| 232 } | 232 } |
| 233 | 233 |
| 234 } // namespace chromeos | 234 } // namespace chromeos |
| OLD | NEW |