| 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/cloud/test_request_interceptor.h" | 9 #include "chrome/browser/policy/cloud/test_request_interceptor.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/common/chrome_switches.h" | |
| 13 #include "chrome/test/base/in_process_browser_test.h" | 12 #include "chrome/test/base/in_process_browser_test.h" |
| 14 #include "components/policy/core/browser/browser_policy_connector.h" | 13 #include "components/policy/core/browser/browser_policy_connector.h" |
| 15 #include "components/policy/core/common/cloud/cloud_policy_client.h" | 14 #include "components/policy/core/common/cloud/cloud_policy_client.h" |
| 16 #include "components/policy/core/common/cloud/mock_cloud_policy_client.h" | 15 #include "components/policy/core/common/cloud/mock_cloud_policy_client.h" |
| 16 #include "components/policy/core/common/policy_switches.h" |
| 17 #include "components/policy/core/common/policy_test_utils.h" | 17 #include "components/policy/core/common/policy_test_utils.h" |
| 18 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
| 19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
| 20 #include "net/url_request/url_request_context_getter.h" | 20 #include "net/url_request/url_request_context_getter.h" |
| 21 #include "policy/proto/device_management_backend.pb.h" | 21 #include "policy/proto/device_management_backend.pb.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" |
| (...skipping 165 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 |