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/policy/auto_enrollment_client.h" | 5 #include "chrome/browser/chromeos/policy/auto_enrollment_client.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/prefs/pref_service.h" | |
14 #include "base/prefs/testing_pref_service.h" | |
15 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
16 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
17 #include "base/values.h" | 15 #include "base/values.h" |
18 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
19 #include "chrome/browser/chromeos/policy/server_backed_device_state.h" | 17 #include "chrome/browser/chromeos/policy/server_backed_device_state.h" |
20 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
21 #include "chrome/test/base/scoped_testing_local_state.h" | 19 #include "chrome/test/base/scoped_testing_local_state.h" |
22 #include "chrome/test/base/testing_browser_process.h" | 20 #include "chrome/test/base/testing_browser_process.h" |
23 #include "components/policy/core/common/cloud/mock_device_management_service.h" | 21 #include "components/policy/core/common/cloud/mock_device_management_service.h" |
| 22 #include "components/prefs/pref_service.h" |
| 23 #include "components/prefs/testing_pref_service.h" |
24 #include "content/public/test/test_browser_thread_bundle.h" | 24 #include "content/public/test/test_browser_thread_bundle.h" |
25 #include "crypto/sha2.h" | 25 #include "crypto/sha2.h" |
26 #include "net/url_request/url_request_context_getter.h" | 26 #include "net/url_request/url_request_context_getter.h" |
27 #include "net/url_request/url_request_test_util.h" | 27 #include "net/url_request/url_request_test_util.h" |
28 #include "testing/gmock/include/gmock/gmock.h" | 28 #include "testing/gmock/include/gmock/gmock.h" |
29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
30 | 30 |
31 namespace em = enterprise_management; | 31 namespace em = enterprise_management; |
32 | 32 |
33 namespace policy { | 33 namespace policy { |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 EXPECT_EQ(AUTO_ENROLLMENT_STATE_TRIGGER_ENROLLMENT, state_); | 615 EXPECT_EQ(AUTO_ENROLLMENT_STATE_TRIGGER_ENROLLMENT, state_); |
616 EXPECT_TRUE(HasCachedDecision()); | 616 EXPECT_TRUE(HasCachedDecision()); |
617 VerifyServerBackedState("example.com", | 617 VerifyServerBackedState("example.com", |
618 kDeviceStateRestoreModeReEnrollmentEnforced, | 618 kDeviceStateRestoreModeReEnrollmentEnforced, |
619 kDisabledMessage); | 619 kDisabledMessage); |
620 Mock::VerifyAndClearExpectations(service_.get()); | 620 Mock::VerifyAndClearExpectations(service_.get()); |
621 } | 621 } |
622 | 622 |
623 } // namespace | 623 } // namespace |
624 } // namespace policy | 624 } // namespace policy |
OLD | NEW |