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 Review URL: https://codereview.chromium.org/654393002 Cr-Commit-Position: refs/heads/master@{#300056}
Showing
Please register or sign in to comment