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

Side by Side Diff: ash/wm/workspace/workspace_layout_manager_unittest.cc

Issue 138003007: [Cleanup] Screen cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make sure screen_for_shutdown is reset everytime Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/workspace/workspace_layout_manager.h" 5 #include "ash/wm/workspace/workspace_layout_manager.h"
6 6
7 #include "ash/display/display_layout.h" 7 #include "ash/display/display_layout.h"
8 #include "ash/display/display_manager.h" 8 #include "ash/display/display_manager.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/screen_ash.h" 10 #include "ash/screen_util.h"
11 #include "ash/shelf/shelf_layout_manager.h" 11 #include "ash/shelf/shelf_layout_manager.h"
12 #include "ash/shelf/shelf_widget.h" 12 #include "ash/shelf/shelf_widget.h"
13 #include "ash/shell.h" 13 #include "ash/shell.h"
14 #include "ash/shell_observer.h" 14 #include "ash/shell_observer.h"
15 #include "ash/test/ash_test_base.h" 15 #include "ash/test/ash_test_base.h"
16 #include "ash/wm/window_state.h" 16 #include "ash/wm/window_state.h"
17 #include "ash/wm/window_util.h" 17 #include "ash/wm/window_util.h"
18 #include "ui/aura/client/aura_constants.h" 18 #include "ui/aura/client/aura_constants.h"
19 #include "ui/aura/root_window.h" 19 #include "ui/aura/root_window.h"
20 #include "ui/aura/test/test_windows.h" 20 #include "ui/aura/test/test_windows.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 window_state->Minimize(); 101 window_state->Minimize();
102 window_state->Restore(); 102 window_state->Restore();
103 EXPECT_EQ("0,0 100x100", window_state->GetRestoreBoundsInScreen().ToString()); 103 EXPECT_EQ("0,0 100x100", window_state->GetRestoreBoundsInScreen().ToString());
104 EXPECT_EQ("10,15 25x35", window.get()->bounds().ToString()); 104 EXPECT_EQ("10,15 25x35", window.get()->bounds().ToString());
105 105
106 if (!SupportsMultipleDisplays()) 106 if (!SupportsMultipleDisplays())
107 return; 107 return;
108 108
109 UpdateDisplay("400x300,500x400"); 109 UpdateDisplay("400x300,500x400");
110 window->SetBoundsInScreen(gfx::Rect(600, 0, 100, 100), 110 window->SetBoundsInScreen(gfx::Rect(600, 0, 100, 100),
111 ScreenAsh::GetSecondaryDisplay()); 111 ScreenUtil::GetSecondaryDisplay());
112 EXPECT_EQ(Shell::GetAllRootWindows()[1], window->GetRootWindow()); 112 EXPECT_EQ(Shell::GetAllRootWindows()[1], window->GetRootWindow());
113 window_state->Minimize(); 113 window_state->Minimize();
114 // This will not be used for un-minimizing window. 114 // This will not be used for un-minimizing window.
115 window_state->SetRestoreBoundsInScreen(gfx::Rect(0, 0, 100, 100)); 115 window_state->SetRestoreBoundsInScreen(gfx::Rect(0, 0, 100, 100));
116 window_state->Restore(); 116 window_state->Restore();
117 EXPECT_EQ("600,0 100x100", window->GetBoundsInScreen().ToString()); 117 EXPECT_EQ("600,0 100x100", window->GetBoundsInScreen().ToString());
118 118
119 // Make sure the unminimized window moves inside the display when 119 // Make sure the unminimized window moves inside the display when
120 // 2nd display is disconnected. 120 // 2nd display is disconnected.
121 window_state->Minimize(); 121 window_state->Minimize();
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 EXPECT_EQ(5, observer.call_count()); 473 EXPECT_EQ(5, observer.call_count());
474 EXPECT_TRUE(observer.is_fullscreen()); 474 EXPECT_TRUE(observer.is_fullscreen());
475 475
476 // Closing the window should change the fullscreen state. 476 // Closing the window should change the fullscreen state.
477 window2.reset(); 477 window2.reset();
478 EXPECT_EQ(6, observer.call_count()); 478 EXPECT_EQ(6, observer.call_count());
479 EXPECT_FALSE(observer.is_fullscreen()); 479 EXPECT_FALSE(observer.is_fullscreen());
480 } 480 }
481 481
482 } // namespace ash 482 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698