Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Issue 654393002: MacViews: Fix WidgetTest.DesktopNativeWidgetNoPaintAfterCloseTest (Closed)

Created:
6 years, 2 months ago by tapted
Modified:
6 years, 2 months ago
Reviewers:
Robert Sesek, sky
CC:
chromium-reviews, tfarina, ben+views_chromium.org, tdanderson+views_chromium.org, chrome-apps-syd-reviews_chromium.org, mac-views-reviews_chromium.org, Andre
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

MacViews: Fix WidgetTest.DesktopNativeWidgetNoPaintAfterCloseTest But.. first make some tests fail. DesktopNativeWidgetNoPaintAfterCloseTest currently passes but it shouldn't. WidgetTests DesktopNativeWidgetNoPaintAfterHideTest and TestWindowVisibilityAfterHide were also passing, but NativeWidgetMac::Hide() is a no-op, so that shouldn't be the case. This CL (first) makes them all fail on Mac. To do this, BridgedNativeWidget needs to call Widget::OnNativeWidgetPaint() rather than painting the RootView directly. And TestWindowVisibilityAfterHide must show the widget. DesktopNativeWidgetNoPaintAfterCloseTest was then fixed by skipping a paint when the window is not visible, as toolkit-views expects. However, Cocoa paints the window before changing -[NSWindow isVisible]. To fix, intercept -[NSWindow orderWindow:relativeTo:]. We need to do this anyway to send Widget::OnNativeWidgetVisibilityChanged(), but that's left for a follow-up. BUG=378134 Committed: https://crrev.com/5ccddf94823808b37a2179e3b3e2fd6f8a0f5286 Cr-Commit-Position: refs/heads/master@{#300056}

Patch Set 1 #

Patch Set 2 : Option B - should be more robust #

Patch Set 3 : Use a RootView in bridgednativewidgettest #

Patch Set 4 : revert to Activate(), since it is asynchronous on Linux #

Patch Set 5 : more consistent #

Total comments: 6

Patch Set 6 : ReadReceivedPaintAndReset #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -33 lines) Patch
M ui/views/cocoa/bridged_content_view.h View 1 chunk +6 lines, -0 lines 0 comments Download
M ui/views/cocoa/bridged_content_view.mm View 2 chunks +5 lines, -2 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget_unittest.mm View 1 2 3 chunks +2 lines, -2 lines 0 comments Download
M ui/views/cocoa/views_nswindow_delegate.h View 1 1 chunk +10 lines, -0 lines 0 comments Download
M ui/views/cocoa/views_nswindow_delegate.mm View 1 2 chunks +10 lines, -0 lines 0 comments Download
M ui/views/focus/focus_manager.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/widget/native_widget_mac.mm View 1 2 3 4 3 chunks +20 lines, -0 lines 0 comments Download
M ui/views/widget/widget_unittest.cc View 1 2 3 4 5 3 chunks +39 lines, -28 lines 0 comments Download

Messages

Total messages: 14 (3 generated)
tapted
HI Robert, could you please take a look at the Mac changes? (Andre feel free ...
6 years, 2 months ago (2014-10-16 08:27:07 UTC) #2
Robert Sesek
This seems reasonable to me, but I'm not an expert in the views machinery. LGTM, ...
6 years, 2 months ago (2014-10-16 18:57:48 UTC) #3
Robert Sesek
On 2014/10/16 18:57:48, Robert Sesek wrote: > This seems reasonable to me, but I'm not ...
6 years, 2 months ago (2014-10-16 18:58:53 UTC) #4
tapted
On 2014/10/16 18:58:53, Robert Sesek wrote: > On 2014/10/16 18:57:48, Robert Sesek wrote: > > ...
6 years, 2 months ago (2014-10-16 21:59:39 UTC) #5
tapted
On 2014/10/16 18:58:53, Robert Sesek wrote: > On 2014/10/16 18:57:48, Robert Sesek wrote: > > ...
6 years, 2 months ago (2014-10-16 22:02:31 UTC) #6
tapted
+sky - could you please take a look at the widget_unittest.cc changes and for OWNERS.
6 years, 2 months ago (2014-10-16 22:08:40 UTC) #8
sky
LGTM https://codereview.chromium.org/654393002/diff/80001/ui/views/widget/widget_unittest.cc File ui/views/widget/widget_unittest.cc (right): https://codereview.chromium.org/654393002/diff/80001/ui/views/widget/widget_unittest.cc#newcode1159 ui/views/widget/widget_unittest.cc:1159: bool ReadReceivedPaint() { nit: make this name more ...
6 years, 2 months ago (2014-10-16 22:39:25 UTC) #9
tapted
Thanks all! https://codereview.chromium.org/654393002/diff/80001/ui/views/widget/widget_unittest.cc File ui/views/widget/widget_unittest.cc (right): https://codereview.chromium.org/654393002/diff/80001/ui/views/widget/widget_unittest.cc#newcode1159 ui/views/widget/widget_unittest.cc:1159: bool ReadReceivedPaint() { On 2014/10/16 22:39:25, sky ...
6 years, 2 months ago (2014-10-17 02:50:34 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/654393002/100001
6 years, 2 months ago (2014-10-17 02:52:14 UTC) #12
commit-bot: I haz the power
Committed patchset #6 (id:100001)
6 years, 2 months ago (2014-10-17 03:46:22 UTC) #13
commit-bot: I haz the power
6 years, 2 months ago (2014-10-17 03:47:35 UTC) #14
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/5ccddf94823808b37a2179e3b3e2fd6f8a0f5286
Cr-Commit-Position: refs/heads/master@{#300056}

Powered by Google App Engine
This is Rietveld 408576698