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" | 10 #include "chrome/browser/policy/cloud/cloud_policy_client.h" |
11 #include "chrome/browser/policy/cloud/mock_cloud_policy_client.h" | 11 #include "chrome/browser/policy/cloud/mock_cloud_policy_client.h" |
12 #include "chrome/browser/policy/cloud/proto/device_management_backend.pb.h" | |
13 #include "chrome/browser/policy/cloud/test_request_interceptor.h" | 12 #include "chrome/browser/policy/cloud/test_request_interceptor.h" |
| 13 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" |
14 #include "chrome/browser/policy/test_utils.h" | 14 #include "chrome/browser/policy/test_utils.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/test/base/in_process_browser_test.h" | 18 #include "chrome/test/base/in_process_browser_test.h" |
19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 | 22 |
23 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 const bool expect_reregister = true; | 177 const bool expect_reregister = true; |
178 interceptor_->PushJobCallback( | 178 interceptor_->PushJobCallback( |
179 TestRequestInterceptor::RegisterJob(expected_type, expect_reregister)); | 179 TestRequestInterceptor::RegisterJob(expected_type, expect_reregister)); |
180 | 180 |
181 EXPECT_FALSE(policy_manager()->core()->client()->is_registered()); | 181 EXPECT_FALSE(policy_manager()->core()->client()->is_registered()); |
182 ASSERT_NO_FATAL_FAILURE(Register()); | 182 ASSERT_NO_FATAL_FAILURE(Register()); |
183 EXPECT_TRUE(policy_manager()->core()->client()->is_registered()); | 183 EXPECT_TRUE(policy_manager()->core()->client()->is_registered()); |
184 } | 184 } |
185 | 185 |
186 } // namespace policy | 186 } // namespace policy |
OLD | NEW |