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

Side by Side Diff: ash/root_window_controller_unittest.cc

Issue 22793011: ash:Shelf - Enable Alternate Shelf and Side Shelf by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/launcher/launcher_view_unittest.cc ('k') | ash/screen_ash_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include "ash/session_state_delegate.h" 7 #include "ash/session_state_delegate.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 views::Widget* normal = CreateTestWidget(gfx::Rect(650, 10, 100, 100)); 165 views::Widget* normal = CreateTestWidget(gfx::Rect(650, 10, 100, 100));
166 EXPECT_EQ(root_windows[1], normal->GetNativeView()->GetRootWindow()); 166 EXPECT_EQ(root_windows[1], normal->GetNativeView()->GetRootWindow());
167 EXPECT_EQ("650,10 100x100", normal->GetWindowBoundsInScreen().ToString()); 167 EXPECT_EQ("650,10 100x100", normal->GetWindowBoundsInScreen().ToString());
168 EXPECT_EQ("50,10 100x100", 168 EXPECT_EQ("50,10 100x100",
169 normal->GetNativeView()->GetBoundsInRootWindow().ToString()); 169 normal->GetNativeView()->GetBoundsInRootWindow().ToString());
170 170
171 views::Widget* maximized = CreateTestWidget(gfx::Rect(700, 10, 100, 100)); 171 views::Widget* maximized = CreateTestWidget(gfx::Rect(700, 10, 100, 100));
172 maximized->Maximize(); 172 maximized->Maximize();
173 EXPECT_EQ(root_windows[1], maximized->GetNativeView()->GetRootWindow()); 173 EXPECT_EQ(root_windows[1], maximized->GetNativeView()->GetRootWindow());
174 EXPECT_EQ("600,0 500x452", maximized->GetWindowBoundsInScreen().ToString()); 174 EXPECT_EQ("600,0 500x453", maximized->GetWindowBoundsInScreen().ToString());
175 EXPECT_EQ("0,0 500x452", 175 EXPECT_EQ("0,0 500x453",
176 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); 176 maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
177 177
178 views::Widget* minimized = CreateTestWidget(gfx::Rect(800, 10, 100, 100)); 178 views::Widget* minimized = CreateTestWidget(gfx::Rect(800, 10, 100, 100));
179 minimized->Minimize(); 179 minimized->Minimize();
180 EXPECT_EQ(root_windows[1], minimized->GetNativeView()->GetRootWindow()); 180 EXPECT_EQ(root_windows[1], minimized->GetNativeView()->GetRootWindow());
181 EXPECT_EQ("800,10 100x100", 181 EXPECT_EQ("800,10 100x100",
182 minimized->GetWindowBoundsInScreen().ToString()); 182 minimized->GetWindowBoundsInScreen().ToString());
183 183
184 views::Widget* fullscreen = CreateTestWidget(gfx::Rect(900, 10, 100, 100)); 184 views::Widget* fullscreen = CreateTestWidget(gfx::Rect(900, 10, 100, 100));
185 fullscreen->SetFullscreen(true); 185 fullscreen->SetFullscreen(true);
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 BlockUserSession(static_cast<UserSessionBlockReason>(block_reason)); 566 BlockUserSession(static_cast<UserSessionBlockReason>(block_reason));
567 event_generator.ClickLeftButton(); 567 event_generator.ClickLeftButton();
568 expected_mouse_presses++; 568 expected_mouse_presses++;
569 EXPECT_EQ(expected_mouse_presses, main_delegate->mouse_presses()); 569 EXPECT_EQ(expected_mouse_presses, main_delegate->mouse_presses());
570 UnblockUserSession(); 570 UnblockUserSession();
571 } 571 }
572 } 572 }
573 573
574 } // namespace test 574 } // namespace test
575 } // namespace ash 575 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_view_unittest.cc ('k') | ash/screen_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698