New issue
Advanced search Search tips

Issue 814675 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocked on:
issue 852439
issue 878836



Sign in to add a comment

ui::test::EventGenerator is hard to use under mash

Project Member Reported by tapted@chromium.org, Feb 22 2018

Issue description

I haven't been able to get RoundedOmniboxPopupContentsViewTest.ClickOmnibox working on Mus yet

I suspect it needs something similar to what's happening in tab_drag_controller_interactive_uitest.cc. Stuff like ScreenEventGeneratorDelegate and SetEventGeneratorRootWindow()

https://cs.chromium.org/chromium/src/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc?q=ScreenEventGeneratorDelegate&sq=package:chromium&l=246

But I'm not sure that's enough, since the test actually wants to interrogate the screen to see *which* root window will be hit -- setting the root window explicitly seems to defeat that.

Most recent attempt at fixing is in a patchset:

https://chromium-review.googlesource.com/c/chromium/src/+/925943/3/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view_browsertest.cc
 
Components: -Internals>MUS Internals>Services>WindowService
Cc: msw@chromium.org sky@chromium.org michae...@chromium.org
Components: Internals>Services>Ash
Status: Untriaged (was: Available)
Summary: ui::test::EventGenerator is hard to use under mash (was: ui::test::EventGenerator is hard to use under Mus when multiple windows are involved)
sky/msw - this also came up on:
https://chromium-review.googlesource.com/c/chromium/src/+/1123397/3/chrome/browser/chromeos/extensions/info_private_apitest.cc#157

We need a way for a browser_test in chrome to use something like ui::test::EventGenerator to inject clicks. I thought we had that with EventInjector, but it's not immediately obvious how to use that as a replacement.

IIRC, EventGenerator should automatically use EventInjector under the hood if setup right.
Blockedon: 852439
I don't think EventGenerator is set up to use EventInjector. I also think EventGenerators API isn't really a good match for EventInjector (it doesn't wait for a response). I think the right answer is to use ui_controls, which is wired up to do the right thing in mash. ui_controls won't work at the moment (because of 852439, but hopefully I'll finish it in the next couple of days).
Cc: sadrul@chromium.org
+sadrul as this has come up before see  bug 615033 .
Blockedon: 878836
EventGenerator can now work with mash, but the test Trent mentions above is failing for other reasons.
Owner: sky@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 5

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

commit 5f7e0b4646d2a2bd3354732f16c7938c9b2a442a
Author: Scott Violet <sky@chromium.org>
Date: Wed Sep 05 18:05:17 2018

aura: rename WindowTree::SetHitTestMask and update usage

The hit test mask code wasn't really wired up for the mask, and it turns out
aura's window targetting code doesn't actually use the mask. So, this makes the
code use the hit test insets, which *is* honored by window targetting and
updates the one usage in Chrome.

BUG= 878836 ,814675
TEST=covered by tests

Change-Id: I02e26b62f2847960a0c4d16eee44d653c6e45539
Reviewed-on: https://chromium-review.googlesource.com/1206172
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Jun Mukai <mukai@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588935}
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/chrome/browser/ui/views/omnibox/rounded_omnibox_results_frame.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/services/ws/public/mojom/window_tree.mojom
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/services/ws/server_window.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/services/ws/server_window.h
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/services/ws/window_tree.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/services/ws/window_tree.h
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/services/ws/window_tree_test_helper.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/services/ws/window_tree_test_helper.h
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/services/ws/window_tree_unittest.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/aura/mus/window_port_mus.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/aura/mus/window_port_mus.h
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/aura/mus/window_tree_client.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/aura/mus/window_tree_client.h
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/aura/mus/window_tree_host_mus_unittest.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/aura/test/mus/test_window_tree.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/aura/test/mus/test_window_tree.h
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/aura/window_targeter.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/aura/window_targeter.h
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/aura/window_targeter_unittest.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/views/mus/desktop_window_tree_host_mus.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/views/mus/desktop_window_tree_host_mus.h
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/views/touchui/touch_selection_controller_impl.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/wm/BUILD.gn
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/wm/core/easy_resize_window_targeter.cc
[modify] https://crrev.com/5f7e0b4646d2a2bd3354732f16c7938c9b2a442a/ui/wm/core/easy_resize_window_targeter.h
[delete] https://crrev.com/d86eb25c3d298976a90e63742caa2764ac3bbf35/ui/wm/core/easy_resize_window_targeter_unittest.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 5

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

commit 5021e3812565e27395dd96b4e742324e4e024fb3
Author: Scott Violet <sky@chromium.org>
Date: Wed Sep 05 21:11:17 2018

window-service: fix EventInjector for mus

The EventInjectorDelegate implementation for mus has a special EventTarget.
The base class of EventInjectorDelegateMus assumes it can cast EventTargets
to Window. The casting doesn't work for the special EventTarget (it isn't
a Window). This patch adds the necessary overrides to special case the non-Window
EventTarget.

BUG=814675
TEST=covered by tests

Change-Id: Icf2de31115e54630043c162ae45acdde2904877d
Reviewed-on: https://chromium-review.googlesource.com/1208459
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588999}
[modify] https://crrev.com/5021e3812565e27395dd96b4e742324e4e024fb3/ui/aura/test/event_generator_delegate_aura.cc

Sign in to add a comment