DescriptionMacViews: 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 #
Messages
Total messages: 14 (3 generated)
|