| 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..d73e8d3ff71042fbd1a14d2a47f72ac0e222fef1 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() with the
|
| + // first browser. This is intended to set up state applicable to all tests
|
| + // 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_;
|
|
|
|
|