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

Unified Diff: ui/views/widget/native_widget_mac_unittest.mm

Issue 2336983002: MacViews: Trigger shadow invalidation when a translucent window is shown. (Closed)
Patch Set: Address review. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/cocoa/bridged_native_widget.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_mac_unittest.mm
diff --git a/ui/views/widget/native_widget_mac_unittest.mm b/ui/views/widget/native_widget_mac_unittest.mm
index 5ae9c03a58f71ea4f5fb5b9df7ca4dd630e02198..0dec9ded50095c597488f9b4f621fe55f2e16cf5 100644
--- a/ui/views/widget/native_widget_mac_unittest.mm
+++ b/ui/views/widget/native_widget_mac_unittest.mm
@@ -1376,6 +1376,17 @@ new ModalDialogDelegate(ui::MODAL_TYPE_CHILD), nullptr,
test_api.SimulateFrameSwap(gfx::Size(123, 456));
EXPECT_EQ(2, [window invalidateShadowCount]);
+ // Hiding the window does not require shadow invalidation.
+ widget->Hide();
+ test_api.SimulateFrameSwap(gfx::Size(123, 456));
+ EXPECT_EQ(2, [window invalidateShadowCount]);
+
+ // Showing a translucent window after hiding it, should trigger shadow
+ // invalidation.
+ widget->Show();
+ test_api.SimulateFrameSwap(gfx::Size(123, 456));
+ EXPECT_EQ(3, [window invalidateShadowCount]);
+
widget->CloseNow();
}
« no previous file with comments | « ui/views/cocoa/bridged_native_widget.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698