Modal dialogs, when run from tests, do not activate browser windows |
|||
Issue descriptionon non-mac platforms, if an alert() is shown, chrome::FindLastActive() will return that browser, but on mac, it won't. This makes it hard to write tests on mac for this, e.g., see https://codereview.chromium.org/2661403003/#ps60001
,
Feb 2 2017
help us avi@, you're our only hope :)
,
Nov 3 2017
To find our answer, look at chrome/test/base/interactive_test_utils_mac.mm's ShowAndFocusNativeWindow(). What we learn is that because test processes are not bundled, the macOS does not allow them to get focus. ShowAndFocusNativeWindow() goes through a LOT OF WORK to make this work for a test binary, work that is neither necessary nor desired for alert dialogs which are not test-only. The easy answer to all of this is that activation is being removed from alerts. When that is done, all the uses of ui_test_utils::BrowserActivationWaiter that fail with alerts are in tests that will be removed and this bug will be moot.
,
Jun 8 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by jochen@chromium.org
, Feb 1 2017