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

Unified Diff: ash/drag_drop/drag_drop_tracker_unittest.cc

Issue 1260453006: ui: events: Add a class to hold common touch and stylus properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address build problems, add accessor and unit tests. Created 5 years, 4 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
Index: ash/drag_drop/drag_drop_tracker_unittest.cc
diff --git a/ash/drag_drop/drag_drop_tracker_unittest.cc b/ash/drag_drop/drag_drop_tracker_unittest.cc
index 0e4bfa1ec421990d71f94fd3aa71ca0d1133c4f5..2515ed5121f0f119d2999a24cf3b45c7588387e1 100644
--- a/ash/drag_drop/drag_drop_tracker_unittest.cc
+++ b/ash/drag_drop/drag_drop_tracker_unittest.cc
@@ -31,8 +31,10 @@ class DragDropTrackerTest : public test::AshTestBase {
static aura::Window* GetTarget(const gfx::Point& location) {
scoped_ptr<DragDropTracker> tracker(
new DragDropTracker(Shell::GetPrimaryRootWindow(), NULL));
- ui::MouseEvent e(ui::ET_MOUSE_DRAGGED, location, location,
- ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
+ ui::MouseEvent e(
+ ui::ET_MOUSE_DRAGGED, location, location, ui::EventTimeForNow(),
+ ui::EF_NONE, ui::EF_NONE,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
aura::Window* target = tracker->GetTarget(e);
return target;
}
@@ -130,9 +132,10 @@ TEST_F(DragDropTrackerTest, ConvertEvent) {
// Start tracking from the RootWindow0 and converts the mouse event into
// |window0|'s coodinates.
- ui::MouseEvent original00(ui::ET_MOUSE_DRAGGED, gfx::Point(50, 50),
- gfx::Point(50, 50), ui::EventTimeForNow(),
- ui::EF_NONE, ui::EF_NONE);
+ ui::MouseEvent original00(
+ ui::ET_MOUSE_DRAGGED, gfx::Point(50, 50), gfx::Point(50, 50),
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
scoped_ptr<ui::LocatedEvent> converted00(ConvertEvent(window0.get(),
original00));
EXPECT_EQ(original00.type(), converted00->type());
@@ -142,9 +145,10 @@ TEST_F(DragDropTrackerTest, ConvertEvent) {
// Start tracking from the RootWindow0 and converts the mouse event into
// |window1|'s coodinates.
- ui::MouseEvent original01(ui::ET_MOUSE_DRAGGED, gfx::Point(350, 150),
- gfx::Point(350, 150), ui::EventTimeForNow(),
- ui::EF_NONE, ui::EF_NONE);
+ ui::MouseEvent original01(
+ ui::ET_MOUSE_DRAGGED, gfx::Point(350, 150), gfx::Point(350, 150),
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
scoped_ptr<ui::LocatedEvent> converted01(ConvertEvent(window1.get(),
original01));
EXPECT_EQ(original01.type(), converted01->type());
@@ -157,9 +161,10 @@ TEST_F(DragDropTrackerTest, ConvertEvent) {
// Start tracking from the RootWindow1 and converts the mouse event into
// |window0|'s coodinates.
- ui::MouseEvent original10(ui::ET_MOUSE_DRAGGED, gfx::Point(-150, 50),
- gfx::Point(-150, 50), ui::EventTimeForNow(),
- ui::EF_NONE, ui::EF_NONE);
+ ui::MouseEvent original10(
+ ui::ET_MOUSE_DRAGGED, gfx::Point(-150, 50), gfx::Point(-150, 50),
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
scoped_ptr<ui::LocatedEvent> converted10(ConvertEvent(window0.get(),
original10));
EXPECT_EQ(original10.type(), converted10->type());
@@ -169,9 +174,10 @@ TEST_F(DragDropTrackerTest, ConvertEvent) {
// Start tracking from the RootWindow1 and converts the mouse event into
// |window1|'s coodinates.
- ui::MouseEvent original11(ui::ET_MOUSE_DRAGGED, gfx::Point(150, 150),
- gfx::Point(150, 150), ui::EventTimeForNow(),
- ui::EF_NONE, ui::EF_NONE);
+ ui::MouseEvent original11(
+ ui::ET_MOUSE_DRAGGED, gfx::Point(150, 150), gfx::Point(150, 150),
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
scoped_ptr<ui::LocatedEvent> converted11(ConvertEvent(window1.get(),
original11));
EXPECT_EQ(original11.type(), converted11->type());

Powered by Google App Engine
This is Rietveld 408576698