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

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

Issue 2833163002: Change ui cursor identifiers to an enum class. (Closed)
Patch Set: OK, it can't be explicit for mac. 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/drag_controller.cc ('k') | services/ui/ws/event_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/drag_controller_unittest.cc
diff --git a/services/ui/ws/drag_controller_unittest.cc b/services/ui/ws/drag_controller_unittest.cc
index 7bc192c0509df509588cc75162b9abb99bf4e1ef..6484f8ce9d72caaee1d8c1fc85e69027fd852d1b 100644
--- a/services/ui/ws/drag_controller_unittest.cc
+++ b/services/ui/ws/drag_controller_unittest.cc
@@ -282,14 +282,14 @@ TEST_F(DragControllerTest, SimpleDragDrop) {
std::unique_ptr<DragTestWindow> window = BuildWindow();
StartDragOperation(window.get(), ui::mojom::kDropEffectMove);
- EXPECT_EQ(ui::mojom::CursorType::NO_DROP, cursor());
+ EXPECT_EQ(ui::mojom::CursorType::kNoDrop, cursor());
DispatchDrag(window.get(), false, ui::EF_LEFT_MOUSE_BUTTON, gfx::Point(1, 1));
EXPECT_EQ(QueuedType::ENTER, window->queue_response_type());
window->Respond(true);
// (Even though we're doing a move, the cursor name is COPY.)
- EXPECT_EQ(ui::mojom::CursorType::COPY, cursor());
+ EXPECT_EQ(ui::mojom::CursorType::kCopy, cursor());
DispatchDrag(window.get(), false, ui::EF_LEFT_MOUSE_BUTTON, gfx::Point(2, 2));
EXPECT_EQ(QueuedType::OVER, window->queue_response_type());
@@ -538,7 +538,7 @@ TEST_F(DragControllerTest, TargetWindowClosedResetsCursor) {
std::unique_ptr<DragTestWindow> window1 = BuildWindow();
std::unique_ptr<DragTestWindow> window2 = BuildWindow();
StartDragOperation(window1.get(), ui::mojom::kDropEffectMove);
- EXPECT_EQ(ui::mojom::CursorType::NO_DROP, cursor());
+ EXPECT_EQ(ui::mojom::CursorType::kNoDrop, cursor());
// Send some events to |window|.
DispatchDrag(window2.get(), false, ui::EF_LEFT_MOUSE_BUTTON,
@@ -548,13 +548,13 @@ TEST_F(DragControllerTest, TargetWindowClosedResetsCursor) {
DispatchDrag(window2.get(), false, ui::EF_LEFT_MOUSE_BUTTON,
gfx::Point(1, 1));
window2->Respond(true);
- EXPECT_EQ(ui::mojom::CursorType::COPY, cursor());
+ EXPECT_EQ(ui::mojom::CursorType::kCopy, cursor());
// Force the destruction of |window.window|.
window2.reset();
// The cursor no loner indicates that it can drop on |window2|.
- EXPECT_EQ(ui::mojom::CursorType::NO_DROP, cursor());
+ EXPECT_EQ(ui::mojom::CursorType::kNoDrop, cursor());
}
TEST_F(DragControllerTest, SourceWindowClosedWhileDrag) {
@@ -640,20 +640,20 @@ TEST_F(DragControllerTest, RejectingWindowHasProperCursor) {
std::unique_ptr<DragTestWindow> window = BuildWindow();
StartDragOperation(window.get(), ui::mojom::kDropEffectMove);
- EXPECT_EQ(ui::mojom::CursorType::NO_DROP, cursor());
+ EXPECT_EQ(ui::mojom::CursorType::kNoDrop, cursor());
DispatchDrag(window.get(), false, ui::EF_LEFT_MOUSE_BUTTON, gfx::Point(1, 1));
EXPECT_EQ(QueuedType::ENTER, window->queue_response_type());
window->Respond(true);
- EXPECT_EQ(ui::mojom::CursorType::COPY, cursor());
+ EXPECT_EQ(ui::mojom::CursorType::kCopy, cursor());
DispatchDrag(window.get(), false, ui::EF_LEFT_MOUSE_BUTTON, gfx::Point(2, 2));
EXPECT_EQ(QueuedType::OVER, window->queue_response_type());
// At this point, we respond with no available drag actions at this pixel.
window->Respond(false);
- EXPECT_EQ(ui::mojom::CursorType::NO_DROP, cursor());
+ EXPECT_EQ(ui::mojom::CursorType::kNoDrop, cursor());
}
TEST_F(DragControllerTest, ResopnseFromOtherWindowDoesntChangeCursor) {
@@ -668,7 +668,7 @@ TEST_F(DragControllerTest, ResopnseFromOtherWindowDoesntChangeCursor) {
DispatchDrag(window2.get(), false, ui::EF_LEFT_MOUSE_BUTTON,
gfx::Point(1, 1));
- EXPECT_EQ(ui::mojom::CursorType::NO_DROP, cursor());
+ EXPECT_EQ(ui::mojom::CursorType::kNoDrop, cursor());
// Now enter |window1|, and respond.
DispatchDrag(window1.get(), false, ui::EF_LEFT_MOUSE_BUTTON,
@@ -676,13 +676,13 @@ TEST_F(DragControllerTest, ResopnseFromOtherWindowDoesntChangeCursor) {
EXPECT_EQ(QueuedType::ENTER, window1->queue_response_type());
window1->Respond(true);
- EXPECT_EQ(ui::mojom::CursorType::COPY, cursor());
+ EXPECT_EQ(ui::mojom::CursorType::kCopy, cursor());
// Window 2 responding negatively to its queued messages shouldn't change the
// cursor.
window2->Respond(false);
- EXPECT_EQ(ui::mojom::CursorType::COPY, cursor());
+ EXPECT_EQ(ui::mojom::CursorType::kCopy, cursor());
}
} // namespace ws
« no previous file with comments | « services/ui/ws/drag_controller.cc ('k') | services/ui/ws/event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698