OLD | NEW |
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 "chrome/browser/chromeos/settings/device_settings_provider.h" | 5 #include "chrome/browser/chromeos/settings/device_settings_provider.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/test/scoped_path_override.h" | 13 #include "base/test/scoped_path_override.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" | |
16 #include "chrome/browser/chromeos/policy/device_local_account.h" | 15 #include "chrome/browser/chromeos/policy/device_local_account.h" |
17 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" | 16 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
18 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" | 17 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" |
19 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
20 #include "chrome/test/base/scoped_testing_local_state.h" | 19 #include "chrome/test/base/scoped_testing_local_state.h" |
21 #include "chrome/test/base/testing_browser_process.h" | 20 #include "chrome/test/base/testing_browser_process.h" |
22 #include "chrome/test/base/testing_profile.h" | 21 #include "chrome/test/base/testing_profile.h" |
23 #include "chromeos/settings/cros_settings_names.h" | 22 #include "chromeos/settings/cros_settings_names.h" |
| 23 #include "components/user_manager/fake_user_manager.h" |
24 #include "components/user_manager/user.h" | 24 #include "components/user_manager/user.h" |
25 #include "policy/proto/device_management_backend.pb.h" | 25 #include "policy/proto/device_management_backend.pb.h" |
26 #include "testing/gmock/include/gmock/gmock.h" | 26 #include "testing/gmock/include/gmock/gmock.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
28 | 28 |
29 namespace em = enterprise_management; | 29 namespace em = enterprise_management; |
30 | 30 |
31 namespace chromeos { | 31 namespace chromeos { |
32 | 32 |
33 using ::testing::AtLeast; | 33 using ::testing::AtLeast; |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 device_policy_.Build(); | 338 device_policy_.Build(); |
339 device_settings_test_helper_.set_policy_blob(device_policy_.GetBlob()); | 339 device_settings_test_helper_.set_policy_blob(device_policy_.GetBlob()); |
340 ReloadDeviceSettings(); | 340 ReloadDeviceSettings(); |
341 Mock::VerifyAndClearExpectations(this); | 341 Mock::VerifyAndClearExpectations(this); |
342 | 342 |
343 // Verify that the updated state has been decoded correctly. | 343 // Verify that the updated state has been decoded correctly. |
344 EXPECT_FALSE(provider_->Get(kDeviceDisabled)); | 344 EXPECT_FALSE(provider_->Get(kDeviceDisabled)); |
345 } | 345 } |
346 | 346 |
347 } // namespace chromeos | 347 } // namespace chromeos |
OLD | NEW |