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/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 Loading... |
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 |
OLD | NEW |