OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/callback.h" | 5 #include "base/callback.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
16 #include "chrome/browser/chrome_notification_types.h" | 16 #include "chrome/browser/chrome_notification_types.h" |
17 #include "chrome/browser/invalidation/fake_invalidation_service.h" | 17 #include "chrome/browser/invalidation/fake_invalidation_service.h" |
18 #include "chrome/browser/invalidation/invalidation_service_factory.h" | 18 #include "chrome/browser/invalidation/invalidation_service_factory.h" |
19 #include "chrome/browser/policy/browser_policy_connector.h" | 19 #include "chrome/browser/policy/browser_policy_connector.h" |
20 #include "chrome/browser/policy/cloud/cloud_policy_client.h" | |
21 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" | |
22 #include "chrome/browser/policy/cloud/mock_cloud_policy_client.h" | |
23 #include "chrome/browser/policy/policy_service.h" | |
24 #include "chrome/browser/policy/profile_policy_connector.h" | 20 #include "chrome/browser/policy/profile_policy_connector.h" |
25 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 21 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
26 #include "chrome/browser/policy/test/local_policy_test_server.h" | 22 #include "chrome/browser/policy/test/local_policy_test_server.h" |
27 #include "chrome/browser/policy/test/policy_test_utils.h" | |
28 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
29 #include "chrome/browser/ui/browser.h" | 24 #include "chrome/browser/ui/browser.h" |
30 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
31 #include "chrome/test/base/in_process_browser_test.h" | 26 #include "chrome/test/base/in_process_browser_test.h" |
| 27 #include "components/policy/core/common/cloud/cloud_policy_client.h" |
| 28 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 29 #include "components/policy/core/common/cloud/mock_cloud_policy_client.h" |
32 #include "components/policy/core/common/external_data_fetcher.h" | 30 #include "components/policy/core/common/external_data_fetcher.h" |
33 #include "components/policy/core/common/policy_map.h" | 31 #include "components/policy/core/common/policy_map.h" |
| 32 #include "components/policy/core/common/policy_service.h" |
| 33 #include "components/policy/core/common/policy_test_utils.h" |
34 #include "content/public/browser/browser_thread.h" | 34 #include "content/public/browser/browser_thread.h" |
35 #include "content/public/browser/notification_service.h" | 35 #include "content/public/browser/notification_service.h" |
36 #include "content/public/browser/notification_source.h" | 36 #include "content/public/browser/notification_source.h" |
37 #include "content/public/test/test_utils.h" | 37 #include "content/public/test/test_utils.h" |
38 #include "net/url_request/url_request_context_getter.h" | 38 #include "net/url_request/url_request_context_getter.h" |
39 #include "policy/policy_constants.h" | 39 #include "policy/policy_constants.h" |
40 #include "policy/proto/chrome_settings.pb.h" | 40 #include "policy/proto/chrome_settings.pb.h" |
41 #include "policy/proto/cloud_policy.pb.h" | 41 #include "policy/proto/cloud_policy.pb.h" |
42 #include "sync/internal_api/public/base/invalidation.h" | 42 #include "sync/internal_api/public/base/invalidation.h" |
43 #include "testing/gmock/include/gmock/gmock.h" | 43 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 | 425 |
426 // They should now serialize to the same bytes. | 426 // They should now serialize to the same bytes. |
427 std::string chrome_settings_serialized; | 427 std::string chrome_settings_serialized; |
428 std::string cloud_policy_serialized; | 428 std::string cloud_policy_serialized; |
429 ASSERT_TRUE(chrome_settings.SerializeToString(&chrome_settings_serialized)); | 429 ASSERT_TRUE(chrome_settings.SerializeToString(&chrome_settings_serialized)); |
430 ASSERT_TRUE(cloud_policy.SerializeToString(&cloud_policy_serialized)); | 430 ASSERT_TRUE(cloud_policy.SerializeToString(&cloud_policy_serialized)); |
431 EXPECT_EQ(chrome_settings_serialized, cloud_policy_serialized); | 431 EXPECT_EQ(chrome_settings_serialized, cloud_policy_serialized); |
432 } | 432 } |
433 | 433 |
434 } // namespace policy | 434 } // namespace policy |
OLD | NEW |