New issue
Advanced search Search tips

Issue 705176 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Build break: no known conversion from 'int' to 'CGMouseButton'

Project Member Reported by a...@chromium.org, Mar 25 2017

Issue description

This broke with https://codereview.chromium.org/2739773004.

../../content/browser/renderer_host/render_widget_host_view_mac_unittest.mm:1076:11: error: no matching function for call to 'MockMouseEventWithParams'
  event = MockMouseEventWithParams(kCGEventMouseMoved, {6, 9}, 0,
          ^~~~~~~~~~~~~~~~~~~~~~~~
../../content/browser/renderer_host/render_widget_host_view_mac_unittest.mm:160:10: note: candidate function not viable: no known conversion from 'int' to 'CGMouseButton' for 3rd argument
NSEvent* MockMouseEventWithParams(CGEventType mouse_type,
         ^
../../content/browser/renderer_host/render_widget_host_view_mac_unittest.mm:1110:11: error: no matching function for call to 'MockMouseEventWithParams'
  event = MockMouseEventWithParams(kCGEventMouseMoved, {6, 9}, 0,
          ^~~~~~~~~~~~~~~~~~~~~~~~
../../content/browser/renderer_host/render_widget_host_view_mac_unittest.mm:160:10: note: candidate function not viable: no known conversion from 'int' to 'CGMouseButton' for 3rd argument
NSEvent* MockMouseEventWithParams(CGEventType mouse_type,
         ^
../../content/browser/renderer_host/render_widget_host_view_mac_unittest.mm:1137:20: error: no matching function for call to 'MockMouseEventWithParams'
  NSEvent* event = MockMouseEventWithParams(kCGEventMouseMoved, {6, 9}, 0,
                   ^~~~~~~~~~~~~~~~~~~~~~~~
../../content/browser/renderer_host/render_widget_host_view_mac_unittest.mm:160:10: note: candidate function not viable: no known conversion from 'int' to 'CGMouseButton' for 3rd argument
NSEvent* MockMouseEventWithParams(CGEventType mouse_type,
         ^
3 errors generated.

 

Comment 1 by a...@chromium.org, Mar 25 2017

Owner: a...@chromium.org
FYI, in the 10.10 SDK and earlier:

typedef uint32_t CGMouseButton;

and in the 10.11 SDK and later:

typedef CF_ENUM(uint32_t, CGMouseButton)

which is a real enum.

This code is a mystery; why use a 0 when there is a constant? I'm going to upload a fix.

Comment 2 by a...@chromium.org, Mar 25 2017

Cc: lanwei@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 27 2017

Comment 4 by a...@chromium.org, Mar 27 2017

Status: Fixed (was: Assigned)

Sign in to add a comment