| 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_policy_client.h" | 10 #include "chrome/browser/policy/cloud/cloud_policy_client.h" |
| 11 #include "chrome/browser/policy/mock_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" |
| 12 #include "chrome/browser/policy/proto/device_management_backend.pb.h" | 13 #include "chrome/browser/policy/proto/device_management_backend.pb.h" |
| 13 #include "chrome/browser/policy/test_request_interceptor.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) |
| 24 #include "chrome/browser/policy/user_cloud_policy_manager_chromeos.h" | 24 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" |
| 25 #else | 25 #else |
| 26 #include "chrome/browser/policy/user_cloud_policy_manager.h" | 26 #include "chrome/browser/policy/cloud/user_cloud_policy_manager.h" |
| 27 #include "chrome/browser/policy/user_cloud_policy_manager_factory.h" | 27 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" |
| 28 #include "chrome/browser/signin/signin_manager.h" | 28 #include "chrome/browser/signin/signin_manager.h" |
| 29 #include "chrome/browser/signin/signin_manager_factory.h" | 29 #include "chrome/browser/signin/signin_manager_factory.h" |
| 30 #endif | 30 #endif |
| 31 | 31 |
| 32 using testing::AnyNumber; | 32 using testing::AnyNumber; |
| 33 using testing::InvokeWithoutArgs; | 33 using testing::InvokeWithoutArgs; |
| 34 using testing::Mock; | 34 using testing::Mock; |
| 35 using testing::_; | 35 using testing::_; |
| 36 | 36 |
| 37 namespace em = enterprise_management; | 37 namespace em = enterprise_management; |
| (...skipping 139 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 |