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

Unified Diff: components/exo/shell_surface_unittest.cc

Issue 2821963002: Do not hide shadow underlay for max/fullscreen state even if the client disables the shadow. (Closed)
Patch Set: Created 3 years, 8 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 | « components/exo/shell_surface.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shell_surface_unittest.cc
diff --git a/components/exo/shell_surface_unittest.cc b/components/exo/shell_surface_unittest.cc
index d590cbb3df050ca7001ee056a9196f1cdd2fd4a8..d88d5468988261e2ac0b03e386451475bbef5413 100644
--- a/components/exo/shell_surface_unittest.cc
+++ b/components/exo/shell_surface_unittest.cc
@@ -832,6 +832,20 @@ TEST_F(ShellSurfaceTest, ShadowStartMaximized) {
ASSERT_TRUE(shell_surface->shadow_underlay());
EXPECT_TRUE(shell_surface->shadow_underlay()->IsVisible());
+ shell_surface->SetRectangularSurfaceShadow(gfx::Rect(0, 0, 0, 0));
+ // Underlay should be created even without shadow.
+ ASSERT_TRUE(shell_surface->shadow_underlay());
+ EXPECT_TRUE(shell_surface->shadow_underlay()->IsVisible());
+ shell_surface->SetRectangularShadowEnabled(false);
+ surface->Commit();
+ // Underlay should be created even without shadow.
+ ASSERT_TRUE(shell_surface->shadow_underlay());
+ EXPECT_TRUE(shell_surface->shadow_underlay()->IsVisible());
+
+ shell_surface->SetRectangularShadowEnabled(true);
+ shell_surface->SetRectangularSurfaceShadow(gfx::Rect(10, 10, 100, 100));
+ surface->Commit();
+
// Restore the window and make sure the shadow is created, visible and
// has the latest bounds.
widget->Restore();
« no previous file with comments | « components/exo/shell_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698