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 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 RunGestureDragTests(gfx::Vector2d(0, 100)); | 1201 RunGestureDragTests(gfx::Vector2d(0, 100)); |
1202 | 1202 |
1203 shelf->SetAlignment(SHELF_ALIGNMENT_LEFT); | 1203 shelf->SetAlignment(SHELF_ALIGNMENT_LEFT); |
1204 RunGestureDragTests(gfx::Vector2d(-100, 0)); | 1204 RunGestureDragTests(gfx::Vector2d(-100, 0)); |
1205 | 1205 |
1206 shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT); | 1206 shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT); |
1207 RunGestureDragTests(gfx::Vector2d(100, 0)); | 1207 RunGestureDragTests(gfx::Vector2d(100, 0)); |
1208 } | 1208 } |
1209 | 1209 |
1210 TEST_F(ShelfLayoutManagerTest, WindowVisibilityDisablesAutoHide) { | 1210 TEST_F(ShelfLayoutManagerTest, WindowVisibilityDisablesAutoHide) { |
| 1211 if (!SupportsMultipleDisplays()) |
| 1212 return; |
| 1213 |
1211 UpdateDisplay("800x600,800x600"); | 1214 UpdateDisplay("800x600,800x600"); |
1212 ShelfLayoutManager* shelf = GetShelfLayoutManager(); | 1215 ShelfLayoutManager* shelf = GetShelfLayoutManager(); |
1213 shelf->LayoutShelf(); | 1216 shelf->LayoutShelf(); |
1214 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); | 1217 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
1215 | 1218 |
1216 // Create a visible window so auto-hide behavior is enforced | 1219 // Create a visible window so auto-hide behavior is enforced |
1217 views::Widget* dummy = CreateTestWidget(); | 1220 views::Widget* dummy = CreateTestWidget(); |
1218 | 1221 |
1219 // Window visible => auto hide behaves normally. | 1222 // Window visible => auto hide behaves normally. |
1220 shelf->UpdateVisibilityState(); | 1223 shelf->UpdateVisibilityState(); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1463 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); | 1466 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); |
1464 } else { | 1467 } else { |
1465 EXPECT_FALSE(shelf->IsVisible()); | 1468 EXPECT_FALSE(shelf->IsVisible()); |
1466 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); | 1469 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); |
1467 } | 1470 } |
1468 } | 1471 } |
1469 } | 1472 } |
1470 | 1473 |
1471 } // namespace internal | 1474 } // namespace internal |
1472 } // namespace ash | 1475 } // namespace ash |
OLD | NEW |