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

Unified Diff: ui/events/x/events_x_unittest.cc

Issue 1068463003: A mouse event created from the same native event will be marked as repeated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modified EventsXTest.ClickCount to account for the change. Created 5 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 | « ui/events/event_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/x/events_x_unittest.cc
diff --git a/ui/events/x/events_x_unittest.cc b/ui/events/x/events_x_unittest.cc
index 8b604ae5579b1df32f388d2c459376f1f266a5bc..770445e27fce8dfdcfac8354ed3cf68de9da47f4 100644
--- a/ui/events/x/events_x_unittest.cc
+++ b/ui/events/x/events_x_unittest.cc
@@ -208,9 +208,11 @@ TEST_F(EventsXTest, ClickCount) {
XEvent event;
gfx::Point location(5, 10);
+ base::TimeDelta time_stamp = base::TimeDelta::FromMilliseconds(1);
for (int i = 1; i <= 3; ++i) {
InitButtonEvent(&event, true, location, 1, 0);
{
+ event.xbutton.time = time_stamp.InMilliseconds();
MouseEvent mouseev(&event);
EXPECT_EQ(ui::ET_MOUSE_PRESSED, mouseev.type());
EXPECT_EQ(i, mouseev.GetClickCount());
@@ -218,10 +220,12 @@ TEST_F(EventsXTest, ClickCount) {
InitButtonEvent(&event, false, location, 1, 0);
{
+ event.xbutton.time = time_stamp.InMilliseconds();
MouseEvent mouseev(&event);
EXPECT_EQ(ui::ET_MOUSE_RELEASED, mouseev.type());
EXPECT_EQ(i, mouseev.GetClickCount());
}
+ time_stamp += base::TimeDelta::FromMilliseconds(1);
}
}
« no previous file with comments | « ui/events/event_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698