OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 void InitializeEmptyExtensionService(); | 33 void InitializeEmptyExtensionService(); |
34 | 34 |
35 void InitializeExtensionProcessManager(); | 35 void InitializeExtensionProcessManager(); |
36 | 36 |
37 void InitializeExtensionServiceWithUpdater(); | 37 void InitializeExtensionServiceWithUpdater(); |
38 | 38 |
39 void InitializeRequestContext(); | 39 void InitializeRequestContext(); |
40 | 40 |
41 static void SetUpTestCase(); | 41 static void SetUpTestCase(); |
42 | 42 |
43 virtual void SetUp(); | 43 virtual void SetUp() OVERRIDE; |
44 | 44 |
45 void set_extensions_enabled(bool enabled) { | 45 void set_extensions_enabled(bool enabled) { |
46 service_->set_extensions_enabled(enabled); | 46 service_->set_extensions_enabled(enabled); |
47 } | 47 } |
48 | 48 |
49 protected: | 49 protected: |
50 void InitializeExtensionServiceHelper(bool autoupdate_enabled); | 50 void InitializeExtensionServiceHelper(bool autoupdate_enabled); |
51 | 51 |
52 MessageLoop loop_; | 52 MessageLoop loop_; |
53 base::ShadowingAtExitManager at_exit_manager_; | 53 base::ShadowingAtExitManager at_exit_manager_; |
54 ScopedTempDir temp_dir_; | 54 ScopedTempDir temp_dir_; |
55 scoped_ptr<TestingProfile> profile_; | 55 scoped_ptr<TestingProfile> profile_; |
56 FilePath extensions_install_dir_; | 56 FilePath extensions_install_dir_; |
57 FilePath data_dir_; | 57 FilePath data_dir_; |
58 // Owned by |profile_|. | 58 // Owned by |profile_|. |
59 ExtensionService* service_; | 59 ExtensionService* service_; |
60 size_t total_successes_; | 60 size_t total_successes_; |
61 content::TestBrowserThread ui_thread_; | 61 content::TestBrowserThread ui_thread_; |
62 content::TestBrowserThread db_thread_; | 62 content::TestBrowserThread db_thread_; |
63 content::TestBrowserThread webkit_thread_; | 63 content::TestBrowserThread webkit_thread_; |
64 content::TestBrowserThread file_thread_; | 64 content::TestBrowserThread file_thread_; |
65 content::TestBrowserThread io_thread_; | 65 content::TestBrowserThread io_thread_; |
66 }; | 66 }; |
67 | 67 |
68 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ | 68 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ |
OLD | NEW |