| 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/wm/immersive_fullscreen_controller.h" | 5 #include "ash/wm/immersive_fullscreen_controller.h" |
| 6 | 6 |
| 7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/screen_ash.h" | 9 #include "ash/screen_ash.h" |
| 10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 aura::test::EventGenerator& event_generator(GetEventGenerator()); | 323 aura::test::EventGenerator& event_generator(GetEventGenerator()); |
| 324 | 324 |
| 325 gfx::Rect top_container_bounds_in_screen = | 325 gfx::Rect top_container_bounds_in_screen = |
| 326 top_container()->GetBoundsInScreen(); | 326 top_container()->GetBoundsInScreen(); |
| 327 // A position along the top edge of TopContainerView in screen coordinates. | 327 // A position along the top edge of TopContainerView in screen coordinates. |
| 328 gfx::Point top_edge_pos(top_container_bounds_in_screen.x() + 100, | 328 gfx::Point top_edge_pos(top_container_bounds_in_screen.x() + 100, |
| 329 top_container_bounds_in_screen.y()); | 329 top_container_bounds_in_screen.y()); |
| 330 | 330 |
| 331 // Mouse wheel event does nothing. | 331 // Mouse wheel event does nothing. |
| 332 ui::MouseEvent wheel( | 332 ui::MouseEvent wheel( |
| 333 ui::ET_MOUSEWHEEL, top_edge_pos, top_edge_pos, ui::EF_NONE); | 333 ui::ET_MOUSEWHEEL, top_edge_pos, top_edge_pos, ui::EF_NONE, ui::EF_NONE); |
| 334 event_generator.Dispatch(&wheel); | 334 event_generator.Dispatch(&wheel); |
| 335 EXPECT_FALSE(top_edge_hover_timer_running()); | 335 EXPECT_FALSE(top_edge_hover_timer_running()); |
| 336 | 336 |
| 337 // Move to top edge of screen starts hover timer running. We cannot use | 337 // Move to top edge of screen starts hover timer running. We cannot use |
| 338 // MoveMouse() because MoveMouse() stops the timer if it started running. | 338 // MoveMouse() because MoveMouse() stops the timer if it started running. |
| 339 event_generator.MoveMouseTo(top_edge_pos); | 339 event_generator.MoveMouseTo(top_edge_pos); |
| 340 EXPECT_TRUE(top_edge_hover_timer_running()); | 340 EXPECT_TRUE(top_edge_hover_timer_running()); |
| 341 EXPECT_EQ(top_edge_pos.x(), mouse_x_when_hit_top()); | 341 EXPECT_EQ(top_edge_pos.x(), mouse_x_when_hit_top()); |
| 342 | 342 |
| 343 // Moving |ImmersiveFullscreenControllerTest::kMouseRevealBoundsHeight| down | 343 // Moving |ImmersiveFullscreenControllerTest::kMouseRevealBoundsHeight| down |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 // Disabling immersive fullscreen maintains the user's auto-hide selection. | 949 // Disabling immersive fullscreen maintains the user's auto-hide selection. |
| 950 SetEnabled(false); | 950 SetEnabled(false); |
| 951 window()->SetProperty(aura::client::kShowStateKey, | 951 window()->SetProperty(aura::client::kShowStateKey, |
| 952 ui::SHOW_STATE_NORMAL); | 952 ui::SHOW_STATE_NORMAL); |
| 953 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); | 953 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); |
| 954 } | 954 } |
| 955 | 955 |
| 956 } // namespase ash | 956 } // namespase ash |
| 957 | 957 |
| 958 #endif // defined(OS_CHROMEOS) | 958 #endif // defined(OS_CHROMEOS) |
| OLD | NEW |