OLD | NEW |
1 // Copyright (c) 2012 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_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ | 5 #ifndef CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ |
6 #define CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ | 6 #define CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.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" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // This is invoked from Setup. | 135 // This is invoked from Setup. |
136 virtual Browser* CreateBrowser(Profile* profile); | 136 virtual Browser* CreateBrowser(Profile* profile); |
137 | 137 |
138 // Similar to |CreateBrowser|, but creates an incognito browser. | 138 // Similar to |CreateBrowser|, but creates an incognito browser. |
139 virtual Browser* CreateIncognitoBrowser(); | 139 virtual Browser* CreateIncognitoBrowser(); |
140 | 140 |
141 // Creates a browser for a popup window with a single tab (about:blank), waits | 141 // Creates a browser for a popup window with a single tab (about:blank), waits |
142 // for the tab to finish loading, and shows the browser. | 142 // for the tab to finish loading, and shows the browser. |
143 Browser* CreateBrowserForPopup(Profile* profile); | 143 Browser* CreateBrowserForPopup(Profile* profile); |
144 | 144 |
145 // Allows configuration of the browser object before it is shown and the | |
146 // message pump starts running. | |
147 virtual void OnBeforeShowBrowser(Browser* browser) {} | |
148 | |
149 // Called from the various CreateBrowser methods to add a blank tab, wait for | 145 // Called from the various CreateBrowser methods to add a blank tab, wait for |
150 // the navigation to complete, and show the browser's window. | 146 // the navigation to complete, and show the browser's window. |
151 void AddBlankTabAndShow(Browser* browser); | 147 void AddBlankTabAndShow(Browser* browser); |
152 | 148 |
153 // Returns the host resolver being used for the tests. Subclasses might want | 149 // Returns the host resolver being used for the tests. Subclasses might want |
154 // to configure it inside tests. | 150 // to configure it inside tests. |
155 net::RuleBasedHostResolverProc* host_resolver() { | 151 net::RuleBasedHostResolverProc* host_resolver() { |
156 return host_resolver_.get(); | 152 return host_resolver_.get(); |
157 } | 153 } |
158 | 154 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // Temporary user data directory. Used only when a user data directory is not | 198 // Temporary user data directory. Used only when a user data directory is not |
203 // specified in the command line. | 199 // specified in the command line. |
204 ScopedTempDir temp_user_data_dir_; | 200 ScopedTempDir temp_user_data_dir_; |
205 | 201 |
206 #if defined(OS_CHROMEOS) | 202 #if defined(OS_CHROMEOS) |
207 chromeos::ScopedStubCrosEnabler stub_cros_enabler_; | 203 chromeos::ScopedStubCrosEnabler stub_cros_enabler_; |
208 #endif // defined(OS_CHROMEOS) | 204 #endif // defined(OS_CHROMEOS) |
209 }; | 205 }; |
210 | 206 |
211 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ | 207 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ |
OLD | NEW |