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 "chrome/browser/themes/theme_syncable_service.h" | 5 #include "chrome/browser/themes/theme_syncable_service.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "chrome/browser/extensions/extension_service.h" | 16 #include "chrome/browser/extensions/extension_service.h" |
17 #include "chrome/browser/extensions/test_extension_system.h" | 17 #include "chrome/browser/extensions/test_extension_system.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/themes/theme_service.h" | 19 #include "chrome/browser/themes/theme_service.h" |
20 #include "chrome/browser/themes/theme_service_factory.h" | 20 #include "chrome/browser/themes/theme_service_factory.h" |
21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
22 #include "chrome/test/base/testing_profile.h" | 22 #include "chrome/test/base/testing_profile.h" |
| 23 #include "components/sync/api/attachments/attachment_id.h" |
| 24 #include "components/sync/api/fake_sync_change_processor.h" |
| 25 #include "components/sync/api/sync_change_processor_wrapper_for_test.h" |
| 26 #include "components/sync/api/sync_error.h" |
| 27 #include "components/sync/api/sync_error_factory_mock.h" |
| 28 #include "components/sync/core/attachments/attachment_service_proxy_for_test.h" |
| 29 #include "components/sync/protocol/sync.pb.h" |
| 30 #include "components/sync/protocol/theme_specifics.pb.h" |
23 #include "content/public/test/test_browser_thread.h" | 31 #include "content/public/test/test_browser_thread.h" |
24 #include "extensions/browser/extension_prefs.h" | 32 #include "extensions/browser/extension_prefs.h" |
25 #include "extensions/browser/extension_registry.h" | 33 #include "extensions/browser/extension_registry.h" |
26 #include "extensions/common/extension.h" | 34 #include "extensions/common/extension.h" |
27 #include "extensions/common/manifest_constants.h" | 35 #include "extensions/common/manifest_constants.h" |
28 #include "extensions/common/manifest_url_handlers.h" | 36 #include "extensions/common/manifest_url_handlers.h" |
29 #include "extensions/common/permissions/api_permission_set.h" | 37 #include "extensions/common/permissions/api_permission_set.h" |
30 #include "extensions/common/permissions/permission_set.h" | 38 #include "extensions/common/permissions/permission_set.h" |
31 #include "sync/api/attachments/attachment_id.h" | |
32 #include "sync/api/fake_sync_change_processor.h" | |
33 #include "sync/api/sync_change_processor_wrapper_for_test.h" | |
34 #include "sync/api/sync_error.h" | |
35 #include "sync/api/sync_error_factory_mock.h" | |
36 #include "sync/internal_api/public/attachments/attachment_service_proxy_for_test
.h" | |
37 #include "sync/protocol/sync.pb.h" | |
38 #include "sync/protocol/theme_specifics.pb.h" | |
39 #include "testing/gtest/include/gtest/gtest.h" | 39 #include "testing/gtest/include/gtest/gtest.h" |
40 | 40 |
41 #if defined(OS_CHROMEOS) | 41 #if defined(OS_CHROMEOS) |
42 #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" | 42 #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" |
43 #include "chrome/browser/chromeos/settings/cros_settings.h" | 43 #include "chrome/browser/chromeos/settings/cros_settings.h" |
44 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 44 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
45 #endif | 45 #endif |
46 | 46 |
47 using std::string; | 47 using std::string; |
48 | 48 |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 | 657 |
658 TEST_F(PolicyInstalledThemeTest, InstallThemeByPolicy) { | 658 TEST_F(PolicyInstalledThemeTest, InstallThemeByPolicy) { |
659 // Set up theme service to use custom theme that was installed by policy. | 659 // Set up theme service to use custom theme that was installed by policy. |
660 fake_theme_service_->SetTheme(theme_extension_.get()); | 660 fake_theme_service_->SetTheme(theme_extension_.get()); |
661 | 661 |
662 syncer::SyncDataList data_list = | 662 syncer::SyncDataList data_list = |
663 theme_sync_service_->GetAllSyncData(syncer::THEMES); | 663 theme_sync_service_->GetAllSyncData(syncer::THEMES); |
664 | 664 |
665 ASSERT_EQ(0u, data_list.size()); | 665 ASSERT_EQ(0u, data_list.size()); |
666 } | 666 } |
OLD | NEW |