Chromium Code Reviews| Index: chrome/test/base/in_process_browser_test.h |
| diff --git a/chrome/test/base/in_process_browser_test.h b/chrome/test/base/in_process_browser_test.h |
| index ae3d8e9c57a5ef4c1daaf139ca6b89195d17e558..48ebcd803ffe93b5861fee6035fec6e564ee095d 100644 |
| --- a/chrome/test/base/in_process_browser_test.h |
| +++ b/chrome/test/base/in_process_browser_test.h |
| @@ -118,6 +118,17 @@ class InProcessBrowserTest : public content::BrowserTestBase { |
| // Restores state configured in SetUp. |
| void TearDown() override; |
| + using SetUpBrowserFunction = bool(const Browser*); |
| + |
| + // Sets a function that is called from InProcessBrowserTest::SetUp() on the |
| + // first browser. This is intended to set up state applicable to all tests |
|
msw
2016/08/29 01:12:29
nit: s/first/supplied/ or given?
sky
2016/08/29 15:51:20
I changed 'on the' on the previous line to 'with t
|
| + // in the suite. For example, interactive_ui_tests installs a function that |
| + // ensures the first browser is in the foreground, active and has focus. |
| + static void set_global_browser_set_up_function( |
| + SetUpBrowserFunction* set_up_function) { |
| + global_browser_set_up_function_ = set_up_function; |
| + } |
| + |
| protected: |
| // Returns the browser created by CreateBrowser. |
| Browser* browser() const { return browser_; } |
| @@ -234,6 +245,8 @@ class InProcessBrowserTest : public content::BrowserTestBase { |
| // Quits all open browsers and waits until there are no more browsers. |
| void QuitBrowsers(); |
| + static SetUpBrowserFunction* global_browser_set_up_function_; |
| + |
| // Browser created from CreateBrowser. |
| Browser* browser_; |