New issue
Advanced search Search tips

Issue 650859 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocking:
issue 621791



Sign in to add a comment

mac AccessiblePaneViewTest fails if non active top level window cannot set focus

Project Member Reported by warx@chromium.org, Sep 27 2016

Issue description

Run AccessiblePaneViewTest after the CL in 621791 is patched.

The reason may be: 
window activation on mac is asynchronous, even with widget->Show() and widget->Activate() sequential calls, the widget is still not active.

Fails on mac only.
 

Comment 1 by tapted@chromium.org, Sep 27 2016

Activation on Linux is asynchronous too, and AccessiblePaneView is used in the Linux browser window for bookmarks bar, download shelf, etc.. If you're adding code that assumes widget->IsActive() returns true after a call to widget->Show() then it's probably incorrect.

ViewsTestBase::CreateParams() uses GetContext() which effectively sets an Ash root window as the context (that doesn't exist on Mac, which is why the behaviour differs).

But tests relying on activation should be using desktop widgets. E.g. If an AccessiblePaneViewTest does

views_delegate()->set_use_desktop_native_widgets(true);

before creating a Widget, then the test will probably start failing on Linux with the code you're adding as well.

Comment 2 by warx@chromium.org, Sep 27 2016

Yes, it should fail on linux platform, too. Let me take a deeper look into it. If so, I am wondering this should also be put into interactive_ui_tests.

Comment 3 by warx@chromium.org, Sep 27 2016

Owner: warx@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 4 by bugdroid1@chromium.org, May 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0fc05c7d28363f3d27da682d8feaf9240c341ca2

commit 0fc05c7d28363f3d27da682d8feaf9240c341ca2
Author: Robert Liao <robliao@chromium.org>
Date: Tue May 01 16:17:18 2018

Add a New UKM Expectation Due to Activation

BrowserView manual activation will trigger a new UKM entry. This is
only done on Mac because the window itself isn't activated, possibly
due to crbug.com/650859.

BUG=834754,650859

Change-Id: I892e785009393ca6438715c2d0ea87c98ded284e
Reviewed-on: https://chromium-review.googlesource.com/1036739
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555059}
[modify] https://crrev.com/0fc05c7d28363f3d27da682d8feaf9240c341ca2/chrome/browser/ui/tabs/window_activity_watcher_interactive_uitest.cc

Project Member

Comment 5 by bugdroid1@chromium.org, May 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f19e58e7e6e58c17bb5e115a53ae7d02e949c79f

commit f19e58e7e6e58c17bb5e115a53ae7d02e949c79f
Author: Robert Liao <robliao@chromium.org>
Date: Mon May 07 20:08:25 2018

Activate the Browser Window on Mac for interactive_ui_tests CommandsApiTest.Basic

ExtensionKeybindingRegistryViews doesn't get registered until
BrowserView receives activation at least once. On Mac, due to
crbug.com/650859, widgets may not receive activation during tests.

The impact here is that extension command keybindings never register
and CommandsApiTest.Basic waits until timeout for the keybinding to
trigger the command.

The workaround activates the window for the test.

BUG=834754,650859,839469

Change-Id: I0488e515cbcb5bd1941611b2c10d72cc9b69e7bd
Reviewed-on: https://chromium-review.googlesource.com/1042787
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556543}
[modify] https://crrev.com/f19e58e7e6e58c17bb5e115a53ae7d02e949c79f/chrome/browser/extensions/extension_keybinding_apitest.cc

Comment 6 by warx@chromium.org, Jun 18 2018

Cc: -warx@chromium.org
Owner: ----
Status: Untriaged (was: Assigned)
Owner: robliao@chromium.org
Status: Assigned (was: Untriaged)

Sign in to add a comment