OLD | NEW |
---|---|
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 Loading... | |
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()); |
Mr4D (OOO till 08-26)
2013/08/27 02:35:14
Odd. Is the +1 because of the new shelf layout?
Harry McCleave
2013/08/27 03:25:45
Yes, shelf is 1 px smaller (oh yes, soo much fun f
Mr4D (OOO till 08-26)
2013/08/27 14:13:36
Since this was such a small change with such a hug
| |
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 Loading... | |
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 |
OLD | NEW |