New issue
Advanced search Search tips

Issue 663553 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

cocoa_test_event_utils cleanup/TLC

Project Member Reported by tapted@chromium.org, Nov 8 2016

Issue description

Chrome Version       : 56.0.2906.0
OS Version: OS X 10.12.1

AppKit provides limited methods for creating dummy NSEvent objects for testing. The third mouse button and trackpad scrolling events are particularly problematic.

cocoa_test_event_utils::TestScrollEvent is evolving support for trackpad scroll event sequences. Currently used in:
 events_mac_unittest -- EventsMacTest::TrackpadScrollSequence(), and
 ui/views/test/event_generator_delegate_mac - used to make mousewheel scroll events


Some limitations of the current setup:
 - Only event_generator_delegate_mac::MouseEventAtPoint has support for a middle click. (MouseEventAtPointInWindow will silently fail to create middle-click events -- these should use a common codepath; possibly:
 - EventsMacTest::TestMouseEvent(), which creates events with both -[NSEvent window] and middle clicks, but it gets dispatched differently :/ -- see https://codereview.chromium.org/2484863004/
 - A Mighty Mouse makes a special scroll sequence that we don't have tests for
 - Making test NSEvents with +[NSEvent eventWithCGEvent:] requires a special dance, e.g., for coordinate conversion
  - See https://codereview.chromium.org/2486643002/
 - cocoa_test_event_utils.mm's `AttachWindowToCGEvent` uses KVO to set the -[NSEvent window] argument -- it "works" but it doesn't feel right. E.g. the events get dispatched differently if sending to NSApp (but they seem to go fine if they're dispatched directly to NSWindow).

 
Project Member

Comment 1 by sheriffbot@chromium.org, Nov 9 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold Hotlist-Polish
Owner: tapted@chromium.org
Status: Available (was: Untriaged)
I'll own this, but intentionally setting 'Available' in case someone wants to explore.
Status: Assigned (was: Available)
Labels: Hotlist-DesktopUIToolingRequired Hotlist-DesktopUIChecked
Mass UI Triage.

Sign in to add a comment