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

Side by Side Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 1261693004: Allow dynamic enabling/disabling of unified desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « ash/screen_util_unittest.cc ('k') | ash/system/chromeos/tray_display_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/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/accelerators/accelerator_table.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 2331 matching lines...) Expand 10 before | Expand all | Expand 10 after
2342 2342
2343 // Deleting a focused maximized window will switch focus to |window2|. This 2343 // Deleting a focused maximized window will switch focus to |window2|. This
2344 // would normally cause the ShelfLayoutManager to update its state. However 2344 // would normally cause the ShelfLayoutManager to update its state. However
2345 // during shutdown we want to handle this without crashing. 2345 // during shutdown we want to handle this without crashing.
2346 delete window1; 2346 delete window1;
2347 } 2347 }
2348 2348
2349 TEST_F(ShelfLayoutManagerTest, ShelfLayoutInUnifiedDesktop) { 2349 TEST_F(ShelfLayoutManagerTest, ShelfLayoutInUnifiedDesktop) {
2350 if (!SupportsMultipleDisplays()) 2350 if (!SupportsMultipleDisplays())
2351 return; 2351 return;
2352 test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); 2352 Shell::GetInstance()->display_manager()->SetUnifiedDesktopEnabled(true);
2353 2353
2354 UpdateDisplay("500x500, 500x500"); 2354 UpdateDisplay("500x500, 500x500");
2355 2355
2356 StatusAreaWidget* status_area_widget = 2356 StatusAreaWidget* status_area_widget =
2357 Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget(); 2357 Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget();
2358 EXPECT_TRUE(status_area_widget->IsVisible()); 2358 EXPECT_TRUE(status_area_widget->IsVisible());
2359 // Shelf should be in the first display's area. 2359 // Shelf should be in the first display's area.
2360 EXPECT_EQ("348,453 152x47", 2360 EXPECT_EQ("348,453 152x47",
2361 status_area_widget->GetWindowBoundsInScreen().ToString()); 2361 status_area_widget->GetWindowBoundsInScreen().ToString());
2362 } 2362 }
2363 2363
2364 } // namespace ash 2364 } // namespace ash
OLDNEW
« no previous file with comments | « ash/screen_util_unittest.cc ('k') | ash/system/chromeos/tray_display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698