OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_TEST_EXTENSION_ENVIRONMENT_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "content/public/test/test_browser_thread.h" | 10 #include "content/public/test/test_browser_thread.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // Creates an Extension and registers it with the ExtensionService. | 50 // Creates an Extension and registers it with the ExtensionService. |
51 // The Extension has a default manifest of {name: "Extension", | 51 // The Extension has a default manifest of {name: "Extension", |
52 // version: "1.0", manifest_version: 2}, and values in | 52 // version: "1.0", manifest_version: 2}, and values in |
53 // manifest_extra override these defaults. | 53 // manifest_extra override these defaults. |
54 const Extension* MakeExtension(const base::Value& manifest_extra); | 54 const Extension* MakeExtension(const base::Value& manifest_extra); |
55 | 55 |
56 // Returns a test web contents that has a tab id. | 56 // Returns a test web contents that has a tab id. |
57 scoped_ptr<content::WebContents> MakeTab() const; | 57 scoped_ptr<content::WebContents> MakeTab() const; |
58 | 58 |
59 private: | 59 private: |
60 MessageLoopForUI loop_; | 60 base::MessageLoopForUI loop_; |
61 content::TestBrowserThread ui_thread_; | 61 content::TestBrowserThread ui_thread_; |
62 content::TestBrowserThread file_thread_; | 62 content::TestBrowserThread file_thread_; |
63 content::TestBrowserThread file_blocking_thread_; | 63 content::TestBrowserThread file_blocking_thread_; |
64 content::TestBrowserThread io_thread_; | 64 content::TestBrowserThread io_thread_; |
65 // We may need to add the rest of the browser threads here. This is | 65 // We may need to add the rest of the browser threads here. This is |
66 // likely to be indicated by memory leaks in which the object was | 66 // likely to be indicated by memory leaks in which the object was |
67 // expected to be freed by a DeleteSoon() call. | 67 // expected to be freed by a DeleteSoon() call. |
68 | 68 |
69 #if defined(OS_CHROMEOS) | 69 #if defined(OS_CHROMEOS) |
70 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; | 70 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; |
71 chromeos::ScopedTestCrosSettings test_cros_settings_; | 71 chromeos::ScopedTestCrosSettings test_cros_settings_; |
72 chromeos::ScopedTestUserManager test_user_manager_; | 72 chromeos::ScopedTestUserManager test_user_manager_; |
73 #endif | 73 #endif |
74 | 74 |
75 #if defined(OS_WIN) | 75 #if defined(OS_WIN) |
76 ui::ScopedOleInitializer ole_initializer_; | 76 ui::ScopedOleInitializer ole_initializer_; |
77 #endif | 77 #endif |
78 scoped_ptr<TestingProfile> profile_; | 78 scoped_ptr<TestingProfile> profile_; |
79 ExtensionService* extension_service_; | 79 ExtensionService* extension_service_; |
80 }; | 80 }; |
81 | 81 |
82 } // namespace extensions | 82 } // namespace extensions |
83 | 83 |
84 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_ | 84 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_ |
OLD | NEW |