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

Unified Diff: ash/root_window_controller_unittest.cc

Issue 19460014: Do not create workspace for fullscreen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | « no previous file | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller_unittest.cc
diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc
index d1ced436f3bc89794370120861e25bd084d20d0f..2d69b15f4fce7d8eb6f3cf06a0593c81ed94b361 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -196,12 +196,25 @@ TEST_F(RootWindowControllerTest, MoveWindows_Basic) {
// Maximized area on primary display has 3px (given as
// kAutoHideSize in shelf_layout_manager.cc) inset at the bottom.
+
+ // First clear fullscreen status, since both fullscreen and maximized windows
+ // share the same desktop workspace, which cancels the shelf status.
+ fullscreen->SetFullscreen(false);
EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow());
EXPECT_EQ("0,0 600x597",
maximized->GetWindowBoundsInScreen().ToString());
EXPECT_EQ("0,0 600x597",
maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
+ // Set fullscreen to true. In that case the 3px inset becomes invisible so
+ // the maximized window can also use the area fully.
+ fullscreen->SetFullscreen(true);
+ EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow());
+ EXPECT_EQ("0,0 600x600",
+ maximized->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("0,0 600x600",
+ maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
+
EXPECT_EQ(root_windows[0], minimized->GetNativeView()->GetRootWindow());
EXPECT_EQ("200,10 100x100",
minimized->GetWindowBoundsInScreen().ToString());
@@ -377,13 +390,9 @@ TEST_F(RootWindowControllerTest, GetFullscreenWindow) {
w3->Activate();
EXPECT_EQ(w2->GetNativeWindow(), controller->GetFullscreenWindow());
- // Activate the maximized window's workspace. GetFullscreenWindow() should
- // fail because the fullscreen window's workspace is no longer active.
+ // Since there's only one desktop workspace, it always returns the same
+ // fullscreen window.
w1->Activate();
- EXPECT_FALSE(controller->GetFullscreenWindow());
-
- // If the fullscreen window is active, GetFullscreenWindow() should find it.
- w2->Activate();
EXPECT_EQ(w2->GetNativeWindow(), controller->GetFullscreenWindow());
}
« no previous file with comments | « no previous file | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698