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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ |
7 | 7 |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "chrome/browser/extensions/extension_service.h" | 14 #include "chrome/browser/extensions/extension_service.h" |
15 #include "chrome/common/extensions/extension_unittest.h" | 15 #include "chrome/common/extensions/extension_unittest.h" |
16 #include "chrome/common/extensions/feature_switch.h" | 16 #include "chrome/common/extensions/feature_switch.h" |
17 #include "content/public/test/test_browser_thread.h" | 17 #include "content/public/test/test_browser_thread.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
| 20 #if defined(OS_CHROMEOS) |
| 21 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 22 #endif |
| 23 |
20 class TestingProfile; | 24 class TestingProfile; |
21 | 25 |
22 namespace extensions { | 26 namespace extensions { |
23 class ManagementPolicy; | 27 class ManagementPolicy; |
24 } | 28 } |
25 | 29 |
26 class ExtensionServiceTestBase : public extensions::ExtensionTest { | 30 class ExtensionServiceTestBase : public extensions::ExtensionTest { |
27 public: | 31 public: |
28 ExtensionServiceTestBase(); | 32 ExtensionServiceTestBase(); |
29 virtual ~ExtensionServiceTestBase(); | 33 virtual ~ExtensionServiceTestBase(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Managed by extensions::ExtensionSystemFactory. | 69 // Managed by extensions::ExtensionSystemFactory. |
66 ExtensionService* service_; | 70 ExtensionService* service_; |
67 extensions::ManagementPolicy* management_policy_; | 71 extensions::ManagementPolicy* management_policy_; |
68 size_t expected_extensions_count_; | 72 size_t expected_extensions_count_; |
69 content::TestBrowserThread ui_thread_; | 73 content::TestBrowserThread ui_thread_; |
70 content::TestBrowserThread db_thread_; | 74 content::TestBrowserThread db_thread_; |
71 content::TestBrowserThread webkit_thread_; | 75 content::TestBrowserThread webkit_thread_; |
72 content::TestBrowserThread file_thread_; | 76 content::TestBrowserThread file_thread_; |
73 content::TestBrowserThread file_user_blocking_thread_; | 77 content::TestBrowserThread file_user_blocking_thread_; |
74 content::TestBrowserThread io_thread_; | 78 content::TestBrowserThread io_thread_; |
| 79 #if defined(OS_CHROMEOS) |
| 80 // ExtensionService depends on UserManager which depends on CrosSettings. |
| 81 chromeos::ScopedTestCrosSettings test_cros_settings_; |
| 82 #endif |
75 }; | 83 }; |
76 | 84 |
77 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ | 85 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ |
OLD | NEW |