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_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 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 virtual void SetUpDefaultCommandLine(base::CommandLine* command_line); | 163 virtual void SetUpDefaultCommandLine(base::CommandLine* command_line); |
164 | 164 |
165 // Initializes the contents of the user data directory. Called by SetUp() | 165 // Initializes the contents of the user data directory. Called by SetUp() |
166 // after creating the user data directory, but before any browser is launched. | 166 // after creating the user data directory, but before any browser is launched. |
167 // If a test wishes to set up some initial non-empty state in the user data | 167 // If a test wishes to set up some initial non-empty state in the user data |
168 // directory before the browser starts up, it can do so here. Returns true if | 168 // directory before the browser starts up, it can do so here. Returns true if |
169 // successful. | 169 // successful. |
170 virtual bool SetUpUserDataDirectory() WARN_UNUSED_RESULT; | 170 virtual bool SetUpUserDataDirectory() WARN_UNUSED_RESULT; |
171 | 171 |
172 // BrowserTestBase: | 172 // BrowserTestBase: |
173 void RunTestOnMainThreadLoop() override; | 173 void PreRunTestOnMainThread() override; |
| 174 void PostRunTestOnMainThread() override; |
174 | 175 |
175 // Ensures that no devtools are open, and then opens the devtools. | 176 // Ensures that no devtools are open, and then opens the devtools. |
176 void OpenDevToolsWindow(content::WebContents* web_contents); | 177 void OpenDevToolsWindow(content::WebContents* web_contents); |
177 | 178 |
178 // Opens |url| in an incognito browser window with the incognito profile of | 179 // Opens |url| in an incognito browser window with the incognito profile of |
179 // |profile|, blocking until the navigation finishes. This will create a new | 180 // |profile|, blocking until the navigation finishes. This will create a new |
180 // browser if a browser with the incognito profile does not exist. Returns the | 181 // browser if a browser with the incognito profile does not exist. Returns the |
181 // incognito window Browser. | 182 // incognito window Browser. |
182 Browser* OpenURLOffTheRecord(Profile* profile, const GURL& url); | 183 Browser* OpenURLOffTheRecord(Profile* profile, const GURL& url); |
183 | 184 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 // default. | 276 // default. |
276 ui::test::ScopedFakeFullKeyboardAccess faked_full_keyboard_access_; | 277 ui::test::ScopedFakeFullKeyboardAccess faked_full_keyboard_access_; |
277 #endif // OS_MACOSX | 278 #endif // OS_MACOSX |
278 | 279 |
279 #if defined(OS_WIN) | 280 #if defined(OS_WIN) |
280 std::unique_ptr<base::win::ScopedCOMInitializer> com_initializer_; | 281 std::unique_ptr<base::win::ScopedCOMInitializer> com_initializer_; |
281 #endif | 282 #endif |
282 }; | 283 }; |
283 | 284 |
284 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ | 285 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ |
OLD | NEW |