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

Unified Diff: services/ui/ws/window_manager_state_unittest.cc

Issue 2830703003: [views-mus] Support custom cursors. (Closed)
Patch Set: fix cast_shell_linux 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_manager_state_unittest.cc
diff --git a/services/ui/ws/window_manager_state_unittest.cc b/services/ui/ws/window_manager_state_unittest.cc
index ce0c8ce3c4d337c06c5c4dde7c529a6db7f9558f..2fee93d3404af1fcfd25a302e16a27b235ae9b51 100644
--- a/services/ui/ws/window_manager_state_unittest.cc
+++ b/services/ui/ws/window_manager_state_unittest.cc
@@ -26,6 +26,7 @@
#include "services/ui/ws/window_server.h"
#include "services/ui/ws/window_tree.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/cursor/cursor.h"
#include "ui/events/event.h"
namespace ui {
@@ -649,8 +650,9 @@ TEST_F(WindowManagerStateTest, CursorResetOverNoTarget) {
window_tree()->AddWindow(FirstRootId(window_tree()), child_window_id);
child_window->SetVisible(true);
child_window->SetBounds(gfx::Rect(0, 0, 20, 20));
- child_window->parent()->SetPredefinedCursor(ui::mojom::CursorType::kCopy);
- EXPECT_EQ(ui::mojom::CursorType::kCopy, display_test_api.last_cursor());
+ child_window->parent()->SetCursor(ui::CursorData(ui::CursorType::kCopy));
+ EXPECT_EQ(ui::CursorType::kCopy,
+ display_test_api.last_cursor().cursor_type());
// Move the mouse outside the bounds of the child, so that the mouse is not
// over any valid windows. Cursor should change to POINTER.
ui::PointerEvent move(
@@ -660,7 +662,8 @@ TEST_F(WindowManagerStateTest, CursorResetOverNoTarget) {
window_manager_state()->ProcessEvent(move, 0);
// The event isn't over a valid target, which should trigger resetting the
// cursor to POINTER.
- EXPECT_EQ(ui::mojom::CursorType::kPointer, display_test_api.last_cursor());
+ EXPECT_EQ(ui::CursorType::kPointer,
+ display_test_api.last_cursor().cursor_type());
}
} // namespace test
« 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