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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
16 #include "chrome/browser/extensions/extension_browsertest.h" | 16 #include "chrome/browser/extensions/extension_browsertest.h" |
17 #include "chrome/browser/extensions/extension_test_message_listener.h" | 17 #include "chrome/browser/extensions/extension_test_message_listener.h" |
18 #include "chrome/browser/policy/browser_policy_connector.h" | 18 #include "chrome/browser/policy/browser_policy_connector.h" |
19 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" | |
20 #include "chrome/browser/policy/cloud/mock_cloud_policy_client.h" | |
21 #include "chrome/browser/policy/policy_service.h" | |
22 #include "chrome/browser/policy/profile_policy_connector.h" | 19 #include "chrome/browser/policy/profile_policy_connector.h" |
23 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 20 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
24 #include "chrome/browser/policy/proto/cloud/chrome_extension_policy.pb.h" | 21 #include "chrome/browser/policy/proto/cloud/chrome_extension_policy.pb.h" |
25 #include "chrome/browser/policy/test/local_policy_test_server.h" | 22 #include "chrome/browser/policy/test/local_policy_test_server.h" |
26 #include "chrome/browser/policy/test/policy_test_utils.h" | |
27 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
28 #include "chrome/browser/ui/browser.h" | 24 #include "chrome/browser/ui/browser.h" |
29 #include "chrome/common/chrome_paths.h" | 25 #include "chrome/common/chrome_paths.h" |
30 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
| 27 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 28 #include "components/policy/core/common/cloud/mock_cloud_policy_client.h" |
| 29 #include "components/policy/core/common/policy_service.h" |
31 #include "components/policy/core/common/policy_switches.h" | 30 #include "components/policy/core/common/policy_switches.h" |
| 31 #include "components/policy/core/common/policy_test_utils.h" |
32 #include "extensions/common/extension.h" | 32 #include "extensions/common/extension.h" |
33 #include "net/url_request/url_request_context_getter.h" | 33 #include "net/url_request/url_request_context_getter.h" |
34 #include "policy/proto/cloud_policy.pb.h" | 34 #include "policy/proto/cloud_policy.pb.h" |
35 #include "testing/gmock/include/gmock/gmock.h" | 35 #include "testing/gmock/include/gmock/gmock.h" |
36 #include "testing/gtest/include/gtest/gtest.h" | 36 #include "testing/gtest/include/gtest/gtest.h" |
37 | 37 |
38 #if defined(OS_CHROMEOS) | 38 #if defined(OS_CHROMEOS) |
39 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" | 39 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" |
40 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom
eos.h" | 40 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom
eos.h" |
41 #include "chromeos/chromeos_switches.h" | 41 #include "chromeos/chromeos_switches.h" |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 ExtensionTestMessageListener signin_policy_listener(kTestPolicyJSON, true); | 328 ExtensionTestMessageListener signin_policy_listener(kTestPolicyJSON, true); |
329 event_listener2.Reply("get-policy-Name"); | 329 event_listener2.Reply("get-policy-Name"); |
330 EXPECT_TRUE(signin_policy_listener.WaitUntilSatisfied()); | 330 EXPECT_TRUE(signin_policy_listener.WaitUntilSatisfied()); |
331 | 331 |
332 // And the cache is back. | 332 // And the cache is back. |
333 EXPECT_TRUE(base::PathExists(cache_path)); | 333 EXPECT_TRUE(base::PathExists(cache_path)); |
334 } | 334 } |
335 #endif | 335 #endif |
336 | 336 |
337 } // namespace policy | 337 } // namespace policy |
OLD | NEW |