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/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/scoped_temp_dir.h" | 13 #include "base/scoped_temp_dir.h" |
14 #include "chrome/browser/extensions/extension_service.h" | 14 #include "chrome/browser/extensions/extension_service.h" |
15 #include "content/public/test/test_browser_thread.h" | 15 #include "content/public/test/test_browser_thread.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 class TestingProfile; | 18 class TestingProfile; |
19 | 19 |
20 class ExtensionServiceTestBase : public testing::Test { | 20 class ExtensionServiceTestBase : public testing::Test { |
21 public: | 21 public: |
22 ExtensionServiceTestBase(); | 22 ExtensionServiceTestBase(); |
23 virtual ~ExtensionServiceTestBase(); | 23 virtual ~ExtensionServiceTestBase(); |
24 | 24 |
25 void InitializeExtensionService( | 25 void InitializeExtensionService(const FilePath& profile_path, |
26 const FilePath& pref_file, const FilePath& extensions_install_dir, | 26 const FilePath& pref_file, |
27 bool autoupdate_enabled); | 27 const FilePath& extensions_install_dir, |
| 28 bool autoupdate_enabled); |
28 | 29 |
29 void InitializeInstalledExtensionService( | 30 void InitializeInstalledExtensionService(const FilePath& prefs_file, |
30 const FilePath& prefs_file, const FilePath& source_install_dir); | 31 const FilePath& source_install_dir); |
31 | 32 |
32 void InitializeEmptyExtensionService(); | 33 void InitializeEmptyExtensionService(); |
33 | 34 |
34 void InitializeExtensionProcessManager(); | 35 void InitializeExtensionProcessManager(); |
35 | 36 |
36 void InitializeExtensionServiceWithUpdater(); | 37 void InitializeExtensionServiceWithUpdater(); |
37 | 38 |
38 void InitializeRequestContext(); | 39 void InitializeRequestContext(); |
39 | 40 |
40 static void SetUpTestCase(); | 41 static void SetUpTestCase(); |
(...skipping 19 matching lines...) Expand all Loading... |
60 size_t expected_extensions_count_; | 61 size_t expected_extensions_count_; |
61 content::TestBrowserThread ui_thread_; | 62 content::TestBrowserThread ui_thread_; |
62 content::TestBrowserThread db_thread_; | 63 content::TestBrowserThread db_thread_; |
63 content::TestBrowserThread webkit_thread_; | 64 content::TestBrowserThread webkit_thread_; |
64 content::TestBrowserThread file_thread_; | 65 content::TestBrowserThread file_thread_; |
65 content::TestBrowserThread file_user_blocking_thread_; | 66 content::TestBrowserThread file_user_blocking_thread_; |
66 content::TestBrowserThread io_thread_; | 67 content::TestBrowserThread io_thread_; |
67 }; | 68 }; |
68 | 69 |
69 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ | 70 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ |
OLD | NEW |