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_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 5 #ifndef CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ |
6 #define CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 6 #define CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ |
7 | 7 |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // Creates the profile used by this test. The caller owns the return value. | 134 // Creates the profile used by this test. The caller owns the return value. |
135 virtual TestingProfile* CreateProfile(); | 135 virtual TestingProfile* CreateProfile(); |
136 | 136 |
137 // Destroys the profile which was created through |CreateProfile|. | 137 // Destroys the profile which was created through |CreateProfile|. |
138 virtual void DestroyProfile(TestingProfile* profile); | 138 virtual void DestroyProfile(TestingProfile* profile); |
139 | 139 |
140 // Creates the BrowserWindow used by this test. The caller owns the return | 140 // Creates the BrowserWindow used by this test. The caller owns the return |
141 // value. Can return NULL to use the default window created by Browser. | 141 // value. Can return NULL to use the default window created by Browser. |
142 virtual BrowserWindow* CreateBrowserWindow(); | 142 virtual BrowserWindow* CreateBrowserWindow(); |
143 | 143 |
| 144 // Creates the browser given |profile|, |host_desktop_type| and |
| 145 // |browser_window|. The caller owns the return value. |
| 146 virtual Browser* CreateBrowser(Profile* profile, |
| 147 chrome::HostDesktopType host_desktop_type, |
| 148 BrowserWindow* browser_window); |
| 149 |
144 private: | 150 private: |
145 // We need to create a MessageLoop, otherwise a bunch of things fails. | 151 // We need to create a MessageLoop, otherwise a bunch of things fails. |
146 content::TestBrowserThreadBundle thread_bundle_; | 152 content::TestBrowserThreadBundle thread_bundle_; |
147 base::ShadowingAtExitManager at_exit_manager_; | 153 base::ShadowingAtExitManager at_exit_manager_; |
148 | 154 |
149 #if defined(OS_CHROMEOS) | 155 #if defined(OS_CHROMEOS) |
150 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; | 156 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; |
151 chromeos::ScopedTestCrosSettings test_cros_settings_; | 157 chromeos::ScopedTestCrosSettings test_cros_settings_; |
152 chromeos::ScopedTestUserManager test_user_manager_; | 158 chromeos::ScopedTestUserManager test_user_manager_; |
153 #endif | 159 #endif |
(...skipping 20 matching lines...) Expand all Loading... |
174 ui::ScopedOleInitializer ole_initializer_; | 180 ui::ScopedOleInitializer ole_initializer_; |
175 #endif | 181 #endif |
176 | 182 |
177 // The desktop to create the initial window on. | 183 // The desktop to create the initial window on. |
178 chrome::HostDesktopType host_desktop_type_; | 184 chrome::HostDesktopType host_desktop_type_; |
179 | 185 |
180 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest); | 186 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest); |
181 }; | 187 }; |
182 | 188 |
183 #endif // CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 189 #endif // CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ |
OLD | NEW |