Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: services/ui/ws/window_manager_state_unittest.cc

Issue 2784663003: mus: Rename mojom::Cursor to mojom::CursorType. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/ws/window_manager_state.cc ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 ASSERT_EQ(1u, window_server()->display_manager()->displays().size()); 640 ASSERT_EQ(1u, window_server()->display_manager()->displays().size());
641 Display* display = *(window_server()->display_manager()->displays().begin()); 641 Display* display = *(window_server()->display_manager()->displays().begin());
642 DisplayTestApi display_test_api(display); 642 DisplayTestApi display_test_api(display);
643 const ClientWindowId child_window_id(11); 643 const ClientWindowId child_window_id(11);
644 window_tree()->NewWindow(child_window_id, ServerWindow::Properties()); 644 window_tree()->NewWindow(child_window_id, ServerWindow::Properties());
645 ServerWindow* child_window = 645 ServerWindow* child_window =
646 window_tree()->GetWindowByClientId(child_window_id); 646 window_tree()->GetWindowByClientId(child_window_id);
647 window_tree()->AddWindow(FirstRootId(window_tree()), child_window_id); 647 window_tree()->AddWindow(FirstRootId(window_tree()), child_window_id);
648 child_window->SetVisible(true); 648 child_window->SetVisible(true);
649 child_window->SetBounds(gfx::Rect(0, 0, 20, 20)); 649 child_window->SetBounds(gfx::Rect(0, 0, 20, 20));
650 child_window->parent()->SetPredefinedCursor(ui::mojom::Cursor::COPY); 650 child_window->parent()->SetPredefinedCursor(ui::mojom::CursorType::COPY);
651 EXPECT_EQ(ui::mojom::Cursor::COPY, display_test_api.last_cursor()); 651 EXPECT_EQ(ui::mojom::CursorType::COPY, display_test_api.last_cursor());
652 // Move the mouse outside the bounds of the child, so that the mouse is not 652 // Move the mouse outside the bounds of the child, so that the mouse is not
653 // over any valid windows. Cursor should change to POINTER. 653 // over any valid windows. Cursor should change to POINTER.
654 ui::PointerEvent move( 654 ui::PointerEvent move(
655 ui::ET_POINTER_MOVED, gfx::Point(25, 25), gfx::Point(25, 25), 0, 0, 655 ui::ET_POINTER_MOVED, gfx::Point(25, 25), gfx::Point(25, 25), 0, 0,
656 ui::PointerDetails(EventPointerType::POINTER_TYPE_MOUSE, 0), 656 ui::PointerDetails(EventPointerType::POINTER_TYPE_MOUSE, 0),
657 base::TimeTicks()); 657 base::TimeTicks());
658 window_manager_state()->ProcessEvent(move, 0); 658 window_manager_state()->ProcessEvent(move, 0);
659 // The event isn't over a valid target, which should trigger resetting the 659 // The event isn't over a valid target, which should trigger resetting the
660 // cursor to POINTER. 660 // cursor to POINTER.
661 EXPECT_EQ(ui::mojom::Cursor::POINTER, display_test_api.last_cursor()); 661 EXPECT_EQ(ui::mojom::CursorType::POINTER, display_test_api.last_cursor());
662 } 662 }
663 663
664 } // namespace test 664 } // namespace test
665 } // namespace ws 665 } // namespace ws
666 } // namespace ui 666 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_manager_state.cc ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698