OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/ui/ws/window_manager_state.h" | 5 #include "services/ui/ws/window_manager_state.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 ServerWindow* child_window = | 571 ServerWindow* child_window = |
572 window_tree()->GetWindowByClientId(child_window_id); | 572 window_tree()->GetWindowByClientId(child_window_id); |
573 window_tree()->AddWindow(FirstRootId(window_tree()), child_window_id); | 573 window_tree()->AddWindow(FirstRootId(window_tree()), child_window_id); |
574 child_window->SetVisible(true); | 574 child_window->SetVisible(true); |
575 child_window->SetBounds(gfx::Rect(0, 0, 20, 20)); | 575 child_window->SetBounds(gfx::Rect(0, 0, 20, 20)); |
576 child_window->parent()->SetPredefinedCursor(ui::mojom::Cursor::COPY); | 576 child_window->parent()->SetPredefinedCursor(ui::mojom::Cursor::COPY); |
577 EXPECT_EQ(ui::mojom::Cursor::COPY, display_test_api.last_cursor()); | 577 EXPECT_EQ(ui::mojom::Cursor::COPY, display_test_api.last_cursor()); |
578 // Move the mouse outside the bounds of the child, so that the mouse is not | 578 // Move the mouse outside the bounds of the child, so that the mouse is not |
579 // over any valid windows. Cursor should change to POINTER. | 579 // over any valid windows. Cursor should change to POINTER. |
580 ui::PointerEvent move( | 580 ui::PointerEvent move( |
581 ui::ET_POINTER_MOVED, gfx::Point(25, 25), gfx::Point(25, 25), 0, 0, 0, | 581 ui::ET_POINTER_MOVED, gfx::Point(25, 25), gfx::Point(25, 25), 0, 0, |
582 ui::PointerDetails(EventPointerType::POINTER_TYPE_MOUSE), | 582 ui::PointerDetails(EventPointerType::POINTER_TYPE_MOUSE, 0), |
583 base::TimeTicks()); | 583 base::TimeTicks()); |
584 window_manager_state()->ProcessEvent(move, 0); | 584 window_manager_state()->ProcessEvent(move, 0); |
585 // The event isn't over a valid target, which should trigger resetting the | 585 // The event isn't over a valid target, which should trigger resetting the |
586 // cursor to POINTER. | 586 // cursor to POINTER. |
587 EXPECT_EQ(ui::mojom::Cursor::POINTER, display_test_api.last_cursor()); | 587 EXPECT_EQ(ui::mojom::Cursor::POINTER, display_test_api.last_cursor()); |
588 } | 588 } |
589 | 589 |
590 } // namespace test | 590 } // namespace test |
591 } // namespace ws | 591 } // namespace ws |
592 } // namespace ui | 592 } // namespace ui |
OLD | NEW |