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

Unified Diff: components/exo/shell_surface_unittest.cc

Issue 2764733002: Add black background to ARC maximzied window (Closed)
Patch Set: ARC maximzied window should also have a black background Created 3 years, 9 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 a7d018e25846ba27af56fb1ce52c14d6d17a30c0..bc2f48b30fe381898c7d4dc958836ad248594e86 100644
--- a/components/exo/shell_surface_unittest.cc
+++ b/components/exo/shell_surface_unittest.cc
@@ -854,7 +854,7 @@ TEST_F(ShellSurfaceTest, ToggleFullscreen) {
shell_surface->GetWidget()->GetWindowBoundsInScreen().width());
}
-TEST_F(ShellSurfaceTest, ImmersiveFullscreenBackground) {
+TEST_F(ShellSurfaceTest, MaximizedAndImmersiveFullscreenBackground) {
const gfx::Size display_size =
display::Screen::GetScreen()->GetPrimaryDisplay().size();
const gfx::Size buffer_size(display_size);
@@ -877,12 +877,12 @@ TEST_F(ShellSurfaceTest, ImmersiveFullscreenBackground) {
EXPECT_EQ(display::Screen::GetScreen()->GetPrimaryDisplay().size(),
shell_surface->surface_for_testing()->window()->bounds().size());
- ash::wm::WMEvent event(ash::wm::WM_EVENT_TOGGLE_FULLSCREEN);
+ ash::wm::WMEvent fullscreen_event(ash::wm::WM_EVENT_TOGGLE_FULLSCREEN);
ash::WmWindow* window =
ash::WmWindow::Get(shell_surface->GetWidget()->GetNativeWindow());
// Enter immersive fullscreen mode. Shadow underlay is fullscreen.
- window->GetWindowState()->OnWMEvent(&event);
+ window->GetWindowState()->OnWMEvent(&fullscreen_event);
EXPECT_TRUE(shell_surface->shadow_underlay()->IsVisible());
EXPECT_EQ(1.f, shell_surface->shadow_underlay()->layer()->opacity());
@@ -890,8 +890,23 @@ TEST_F(ShellSurfaceTest, ImmersiveFullscreenBackground) {
shell_surface->shadow_underlay()->bounds().size());
// Leave fullscreen mode. Shadow underlay is restored.
- window->GetWindowState()->OnWMEvent(&event);
+ window->GetWindowState()->OnWMEvent(&fullscreen_event);
+ EXPECT_TRUE(shell_surface->shadow_underlay()->IsVisible());
+ EXPECT_EQ(shadow_bounds, shell_surface->shadow_underlay()->bounds());
+
+ ash::wm::WMEvent maximize_event(ash::wm::WM_EVENT_TOGGLE_MAXIMIZE);
+
+ // Enter maximized mode. Shadow underlay is fullscreen.
+ window->GetWindowState()->OnWMEvent(&maximize_event);
EXPECT_TRUE(shell_surface->shadow_underlay()->IsVisible());
+ EXPECT_EQ(1.f, shell_surface->shadow_underlay()->layer()->opacity());
+ EXPECT_EQ(display::Screen::GetScreen()->GetPrimaryDisplay().size(),
+ shell_surface->shadow_underlay()->bounds().size());
+
+ // Leave maximized mode. Shadow underlay is fullscreen.
+ window->GetWindowState()->OnWMEvent(&maximize_event);
+ EXPECT_TRUE(shell_surface->shadow_underlay()->IsVisible());
+ EXPECT_EQ(1.f, shell_surface->shadow_underlay()->layer()->opacity());
EXPECT_EQ(shadow_bounds, shell_surface->shadow_underlay()->bounds());
}
« 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