| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shared/immersive_fullscreen_controller.h" | 5 #include "ash/shared/immersive_fullscreen_controller.h" |
| 6 | 6 |
| 7 #include "ash/common/shelf/wm_shelf.h" | 7 #include "ash/common/shelf/wm_shelf.h" |
| 8 #include "ash/common/wm/window_state.h" | 8 #include "ash/common/wm/window_state.h" |
| 9 #include "ash/display/mouse_cursor_event_filter.h" | 9 #include "ash/display/mouse_cursor_event_filter.h" |
| 10 #include "ash/public/cpp/shelf_types.h" | 10 #include "ash/public/cpp/shelf_types.h" |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 EXPECT_TRUE(controller()->IsRevealed()); | 489 EXPECT_TRUE(controller()->IsRevealed()); |
| 490 MoveMouse(top_container_bounds_in_screen.x(), | 490 MoveMouse(top_container_bounds_in_screen.x(), |
| 491 top_container_bounds_in_screen.bottom() + 50); | 491 top_container_bounds_in_screen.bottom() + 50); |
| 492 EXPECT_FALSE(controller()->IsRevealed()); | 492 EXPECT_FALSE(controller()->IsRevealed()); |
| 493 } | 493 } |
| 494 | 494 |
| 495 // Test mouse event processing for top-of-screen reveal triggering when the user | 495 // Test mouse event processing for top-of-screen reveal triggering when the user |
| 496 // has a vertical display layout (primary display above/below secondary display) | 496 // has a vertical display layout (primary display above/below secondary display) |
| 497 // and the immersive fullscreen window is on the bottom display. | 497 // and the immersive fullscreen window is on the bottom display. |
| 498 TEST_F(ImmersiveFullscreenControllerTest, MouseEventsVerticalDisplayLayout) { | 498 TEST_F(ImmersiveFullscreenControllerTest, MouseEventsVerticalDisplayLayout) { |
| 499 if (!SupportsMultipleDisplays()) | |
| 500 return; | |
| 501 | |
| 502 // Set up initial state. | 499 // Set up initial state. |
| 503 UpdateDisplay("800x600,800x600"); | 500 UpdateDisplay("800x600,800x600"); |
| 504 ash::Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( | 501 ash::Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( |
| 505 display::test::CreateDisplayLayout(display_manager(), | 502 display::test::CreateDisplayLayout(display_manager(), |
| 506 display::DisplayPlacement::TOP, 0)); | 503 display::DisplayPlacement::TOP, 0)); |
| 507 | 504 |
| 508 SetEnabled(true); | 505 SetEnabled(true); |
| 509 ASSERT_TRUE(controller()->IsEnabled()); | 506 ASSERT_TRUE(controller()->IsEnabled()); |
| 510 ASSERT_FALSE(controller()->IsRevealed()); | 507 ASSERT_FALSE(controller()->IsRevealed()); |
| 511 | 508 |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 SetEnabled(true); | 1031 SetEnabled(true); |
| 1035 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); | 1032 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); |
| 1036 | 1033 |
| 1037 // Disabling immersive fullscreen maintains the user's auto-hide selection. | 1034 // Disabling immersive fullscreen maintains the user's auto-hide selection. |
| 1038 SetEnabled(false); | 1035 SetEnabled(false); |
| 1039 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); | 1036 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
| 1040 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); | 1037 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); |
| 1041 } | 1038 } |
| 1042 | 1039 |
| 1043 } // namespase ash | 1040 } // namespase ash |
| OLD | NEW |