| Index: chrome/test/base/web_ui_browser_test.cc
|
| diff --git a/chrome/test/base/web_ui_browser_test.cc b/chrome/test/base/web_ui_browser_test.cc
|
| index 5dd111115f0265efbb10e82bce7cccf93195bc04..c0135cfe4ca33b23c90b87c7256c0d975b229e6c 100644
|
| --- a/chrome/test/base/web_ui_browser_test.cc
|
| +++ b/chrome/test/base/web_ui_browser_test.cc
|
| @@ -222,6 +222,17 @@ void WebUIBrowserTest::BrowsePreload(const GURL& browse_to) {
|
| chrome::NavigateParams params(
|
| browser(), GURL(browse_to), ui::PAGE_TRANSITION_TYPED);
|
| params.disposition = CURRENT_TAB;
|
| +
|
| + // This is needed to make the test
|
| + // MaterialHistoryBrowserTest.HistoryToolbarFocusTest pass on macOS. The test
|
| + // is fundamentally flawed, since it expects a particular widget to be
|
| + // focused. Chrome focus semantics are based on the Windows platform, where a
|
| + // widget cannot be focused without window activation. browser_tests can be
|
| + // sharded, so there is no way to enforce that a given window is activated.
|
| + // Focus tests should be interactive_ui_tests, and they should explicitly
|
| + // activate the window. https://crbug.com/642467.
|
| + params.window_action = chrome::NavigateParams::SHOW_WINDOW;
|
| +
|
| chrome::Navigate(¶ms);
|
| navigation_observer.Wait();
|
| }
|
|
|