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

Side by Side Diff: ash/root_window_controller_unittest.cc

Issue 1998933002: Update shelf spacing in Chrome OS according to the MD specs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 4 years, 6 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
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 <memory> 7 #include <memory>
8 8
9 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
10 #include "ash/common/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
11 #include "ash/common/system/tray/system_tray_delegate.h" 11 #include "ash/common/system/tray/system_tray_delegate.h"
12 #include "ash/common/wm/window_state.h" 12 #include "ash/common/wm/window_state.h"
13 #include "ash/display/display_manager.h" 13 #include "ash/display/display_manager.h"
14 #include "ash/session/session_state_delegate.h"
15 #include "ash/shelf/shelf_layout_manager.h"
tdanderson 2016/06/10 22:54:42 are these needed?
yiyix 2016/06/13 18:43:54 sorry, these are from other patches.
14 #include "ash/shell.h" 16 #include "ash/shell.h"
15 #include "ash/test/ash_test_base.h" 17 #include "ash/test/ash_test_base.h"
16 #include "ash/test/display_manager_test_api.h" 18 #include "ash/test/display_manager_test_api.h"
17 #include "ash/wm/system_modal_container_layout_manager.h" 19 #include "ash/wm/system_modal_container_layout_manager.h"
18 #include "ash/wm/window_properties.h" 20 #include "ash/wm/window_properties.h"
19 #include "ash/wm/window_state_aura.h" 21 #include "ash/wm/window_state_aura.h"
20 #include "ash/wm/window_util.h" 22 #include "ash/wm/window_util.h"
21 #include "base/command_line.h" 23 #include "base/command_line.h"
22 #include "ui/aura/client/focus_change_observer.h" 24 #include "ui/aura/client/focus_change_observer.h"
23 #include "ui/aura/client/focus_client.h" 25 #include "ui/aura/client/focus_client.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 UpdateDisplay("600x600"); 194 UpdateDisplay("600x600");
193 195
194 // d2 must have been deleted. 196 // d2 must have been deleted.
195 EXPECT_FALSE(tracker.Contains(d2)); 197 EXPECT_FALSE(tracker.Contains(d2));
196 198
197 EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow()); 199 EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow());
198 EXPECT_EQ("100,20 100x100", normal->GetWindowBoundsInScreen().ToString()); 200 EXPECT_EQ("100,20 100x100", normal->GetWindowBoundsInScreen().ToString());
199 EXPECT_EQ("100,20 100x100", 201 EXPECT_EQ("100,20 100x100",
200 normal->GetNativeView()->GetBoundsInRootWindow().ToString()); 202 normal->GetNativeView()->GetBoundsInRootWindow().ToString());
201 203
202 // Maximized area on primary display has 47px (ash::kShelfSize) inset at the 204 // Maximized area on primary display has 48px (ash::SHELF_SIZE) inset at the
tdanderson 2016/06/10 22:54:42 nit: please include the old comment since we haven
yiyix 2016/06/13 18:43:54 Done.
203 // bottom. 205 // bottom.
204 206
205 // First clear fullscreen status, since both fullscreen and maximized windows 207 // First clear fullscreen status, since both fullscreen and maximized windows
206 // share the same desktop workspace, which cancels the shelf status. 208 // share the same desktop workspace, which cancels the shelf status.
207 fullscreen->SetFullscreen(false); 209 fullscreen->SetFullscreen(false);
208 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow()); 210 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow());
209 EXPECT_EQ("0,0 600x553", maximized->GetWindowBoundsInScreen().ToString()); 211 EXPECT_EQ("0,0 600x553", maximized->GetWindowBoundsInScreen().ToString());
210 EXPECT_EQ("0,0 600x553", 212 EXPECT_EQ("0,0 600x553",
211 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); 213 maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
212 214
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 keyboard_controller->ui()->GetKeyboardWindow()->SetBounds( 1045 keyboard_controller->ui()->GetKeyboardWindow()->SetBounds(
1044 gfx::Rect(0, 400, 800, 200)); 1046 gfx::Rect(0, 400, 800, 200));
1045 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString()); 1047 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString());
1046 1048
1047 UpdateDisplay("600x800"); 1049 UpdateDisplay("600x800");
1048 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString()); 1050 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString());
1049 } 1051 }
1050 1052
1051 } // namespace test 1053 } // namespace test
1052 } // namespace ash 1054 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698