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

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: Created 4 years, 7 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
« no previous file with comments | « no previous file | ash/shelf/app_list_button.cc » ('j') | ash/shelf/overflow_button.cc » ('J')
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 <memory> 7 #include <memory>
8 8
9 #include "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
10 #include "ash/session/session_state_delegate.h" 10 #include "ash/session/session_state_delegate.h"
11 #include "ash/shelf/shelf_constants.h"
bruthig 2016/05/25 20:24:52 Is this needed? This file doesn't appear to actua
yiyix 2016/06/02 03:54:53 Done.
11 #include "ash/shelf/shelf_layout_manager.h" 12 #include "ash/shelf/shelf_layout_manager.h"
12 #include "ash/shell.h" 13 #include "ash/shell.h"
13 #include "ash/shell_window_ids.h" 14 #include "ash/shell_window_ids.h"
14 #include "ash/system/tray/system_tray_delegate.h" 15 #include "ash/system/tray/system_tray_delegate.h"
15 #include "ash/test/ash_test_base.h" 16 #include "ash/test/ash_test_base.h"
16 #include "ash/test/display_manager_test_api.h" 17 #include "ash/test/display_manager_test_api.h"
17 #include "ash/wm/common/window_state.h" 18 #include "ash/wm/common/window_state.h"
18 #include "ash/wm/system_modal_container_layout_manager.h" 19 #include "ash/wm/system_modal_container_layout_manager.h"
19 #include "ash/wm/window_properties.h" 20 #include "ash/wm/window_properties.h"
20 #include "ash/wm/window_state_aura.h" 21 #include "ash/wm/window_state_aura.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 199
199 // d2 must have been deleted. 200 // d2 must have been deleted.
200 EXPECT_FALSE(tracker.Contains(d2)); 201 EXPECT_FALSE(tracker.Contains(d2));
201 202
202 EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow()); 203 EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow());
203 EXPECT_EQ("100,20 100x100", normal->GetWindowBoundsInScreen().ToString()); 204 EXPECT_EQ("100,20 100x100", normal->GetWindowBoundsInScreen().ToString());
204 EXPECT_EQ("100,20 100x100", 205 EXPECT_EQ("100,20 100x100",
205 normal->GetNativeView()->GetBoundsInRootWindow().ToString()); 206 normal->GetNativeView()->GetBoundsInRootWindow().ToString());
206 207
207 // Maximized area on primary display has 3px (given as 208 // Maximized area on primary display has 3px (given as
208 // kAutoHideSize in shelf_layout_manager.cc) inset at the bottom. 209 // kAutoHideSize in shelf_constants.cc) inset at the bottom.
209 210
210 // First clear fullscreen status, since both fullscreen and maximized windows 211 // First clear fullscreen status, since both fullscreen and maximized windows
211 // share the same desktop workspace, which cancels the shelf status. 212 // share the same desktop workspace, which cancels the shelf status.
212 fullscreen->SetFullscreen(false); 213 fullscreen->SetFullscreen(false);
213 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow()); 214 EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow());
214 EXPECT_EQ("0,0 600x597", 215 EXPECT_EQ("0,0 600x597",
215 maximized->GetWindowBoundsInScreen().ToString()); 216 maximized->GetWindowBoundsInScreen().ToString());
216 EXPECT_EQ("0,0 600x597", 217 EXPECT_EQ("0,0 600x597",
217 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); 218 maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
218 219
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 keyboard_controller->ui()->GetKeyboardWindow()->SetBounds( 1050 keyboard_controller->ui()->GetKeyboardWindow()->SetBounds(
1050 gfx::Rect(0, 400, 800, 200)); 1051 gfx::Rect(0, 400, 800, 200));
1051 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString()); 1052 EXPECT_EQ("0,400 800x200", keyboard_container->bounds().ToString());
1052 1053
1053 UpdateDisplay("600x800"); 1054 UpdateDisplay("600x800");
1054 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString()); 1055 EXPECT_EQ("0,600 600x200", keyboard_container->bounds().ToString());
1055 } 1056 }
1056 1057
1057 } // namespace test 1058 } // namespace test
1058 } // namespace ash 1059 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/shelf/app_list_button.cc » ('j') | ash/shelf/overflow_button.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698