OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/policy/browser_policy_connector.h" | 9 #include "chrome/browser/policy/browser_policy_connector.h" |
10 #include "chrome/browser/policy/cloud/cloud_policy_client.h" | |
11 #include "chrome/browser/policy/cloud/mock_cloud_policy_client.h" | |
12 #include "chrome/browser/policy/cloud/test_request_interceptor.h" | 10 #include "chrome/browser/policy/cloud/test_request_interceptor.h" |
13 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" | 11 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" |
14 #include "chrome/browser/policy/test/policy_test_utils.h" | |
15 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/test/base/in_process_browser_test.h" | 15 #include "chrome/test/base/in_process_browser_test.h" |
| 16 #include "components/policy/core/common/cloud/cloud_policy_client.h" |
| 17 #include "components/policy/core/common/cloud/mock_cloud_policy_client.h" |
| 18 #include "components/policy/core/common/policy_test_utils.h" |
19 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
20 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
21 #include "net/url_request/url_request_context_getter.h" | 21 #include "net/url_request/url_request_context_getter.h" |
22 #include "testing/gmock/include/gmock/gmock.h" | 22 #include "testing/gmock/include/gmock/gmock.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 #if defined(OS_CHROMEOS) | 25 #if defined(OS_CHROMEOS) |
26 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" | 26 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" |
27 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom
eos.h" | 27 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom
eos.h" |
28 #else | 28 #else |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 const bool expect_reregister = true; | 192 const bool expect_reregister = true; |
193 interceptor_->PushJobCallback( | 193 interceptor_->PushJobCallback( |
194 TestRequestInterceptor::RegisterJob(expected_type, expect_reregister)); | 194 TestRequestInterceptor::RegisterJob(expected_type, expect_reregister)); |
195 | 195 |
196 EXPECT_FALSE(policy_manager()->core()->client()->is_registered()); | 196 EXPECT_FALSE(policy_manager()->core()->client()->is_registered()); |
197 ASSERT_NO_FATAL_FAILURE(Register()); | 197 ASSERT_NO_FATAL_FAILURE(Register()); |
198 EXPECT_TRUE(policy_manager()->core()->client()->is_registered()); | 198 EXPECT_TRUE(policy_manager()->core()->client()->is_registered()); |
199 } | 199 } |
200 | 200 |
201 } // namespace policy | 201 } // namespace policy |
OLD | NEW |