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

Side by Side Diff: ash/wm/base_layout_manager_unittest.cc

Issue 115113006: Rename Launcher to Shelf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 7 years 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/wm/app_list_controller.cc ('k') | ash/wm/dock/docked_window_layout_manager.h » ('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/wm/base_layout_manager.h" 5 #include "ash/wm/base_layout_manager.h"
6 6
7 #include "ash/screen_ash.h" 7 #include "ash/screen_ash.h"
8 #include "ash/session_state_delegate.h" 8 #include "ash/session_state_delegate.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 // Verify if the window is not resized during screen lock. See: crbug.com/173127 283 // Verify if the window is not resized during screen lock. See: crbug.com/173127
284 TEST_F(BaseLayoutManagerTest, NotResizeWhenScreenIsLocked) { 284 TEST_F(BaseLayoutManagerTest, NotResizeWhenScreenIsLocked) {
285 SetCanLockScreen(true); 285 SetCanLockScreen(true);
286 scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(1, 2, 3, 4))); 286 scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(1, 2, 3, 4)));
287 // window with AlwaysOnTop will be managed by BaseLayoutManager. 287 // window with AlwaysOnTop will be managed by BaseLayoutManager.
288 window->SetProperty(aura::client::kAlwaysOnTopKey, true); 288 window->SetProperty(aura::client::kAlwaysOnTopKey, true);
289 window->Show(); 289 window->Show();
290 290
291 internal::ShelfLayoutManager* shelf = 291 internal::ShelfLayoutManager* shelf =
292 internal::ShelfLayoutManager::ForLauncher(window.get()); 292 internal::ShelfLayoutManager::ForShelf(window.get());
293 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); 293 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
294 294
295 window->SetBounds(ScreenAsh::GetMaximizedWindowBoundsInParent(window.get())); 295 window->SetBounds(ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()));
296 gfx::Rect window_bounds = window->bounds(); 296 gfx::Rect window_bounds = window->bounds();
297 EXPECT_EQ( 297 EXPECT_EQ(
298 ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()).ToString(), 298 ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()).ToString(),
299 window_bounds.ToString()); 299 window_bounds.ToString());
300 300
301 Shell::GetInstance()->session_state_delegate()->LockScreen(); 301 Shell::GetInstance()->session_state_delegate()->LockScreen();
302 shelf->UpdateVisibilityState(); 302 shelf->UpdateVisibilityState();
303 EXPECT_NE( 303 EXPECT_NE(
304 ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()).ToString(), 304 ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()).ToString(),
305 window_bounds.ToString()); 305 window_bounds.ToString());
306 306
307 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); 307 Shell::GetInstance()->session_state_delegate()->UnlockScreen();
308 shelf->UpdateVisibilityState(); 308 shelf->UpdateVisibilityState();
309 EXPECT_EQ(window_bounds.ToString(), window->bounds().ToString()); 309 EXPECT_EQ(window_bounds.ToString(), window->bounds().ToString());
310 } 310 }
311 311
312 } // namespace 312 } // namespace
313 } // namespace ash 313 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/app_list_controller.cc ('k') | ash/wm/dock/docked_window_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698