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

Unified Diff: ui/base/user_activity/user_activity_detector_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: ui/base/user_activity/user_activity_detector_unittest.cc
diff --git a/ui/base/user_activity/user_activity_detector_unittest.cc b/ui/base/user_activity/user_activity_detector_unittest.cc
index 68d9056c851b901e7a914753d83e567beba826bf..dd6d80189213c03e2307db6d8eb4982dd603197d 100644
--- a/ui/base/user_activity/user_activity_detector_unittest.cc
+++ b/ui/base/user_activity/user_activity_detector_unittest.cc
@@ -98,8 +98,10 @@ TEST_F(UserActivityDetectorTest, Basic) {
base::TimeDelta advance_delta = base::TimeDelta::FromMilliseconds(
UserActivityDetector::kNotifyIntervalMs);
AdvanceTime(advance_delta);
- ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, gfx::Point(), gfx::Point(),
- ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
+ ui::MouseEvent mouse_event(
+ ui::ET_MOUSE_MOVED, gfx::Point(), gfx::Point(), ui::EventTimeForNow(),
+ ui::EF_NONE, ui::EF_NONE,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
OnEvent(&mouse_event);
EXPECT_FALSE(mouse_event.handled());
EXPECT_EQ(now_.ToInternalValue(),
@@ -200,9 +202,10 @@ TEST_F(UserActivityDetectorTest, RateLimitNotifications) {
// Checks that the detector ignores synthetic mouse events.
TEST_F(UserActivityDetectorTest, IgnoreSyntheticMouseEvents) {
- ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, gfx::Point(), gfx::Point(),
- ui::EventTimeForNow(), ui::EF_IS_SYNTHESIZED,
- ui::EF_NONE);
+ ui::MouseEvent mouse_event(
+ ui::ET_MOUSE_MOVED, gfx::Point(), gfx::Point(), ui::EventTimeForNow(),
+ ui::EF_IS_SYNTHESIZED, ui::EF_NONE,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
OnEvent(&mouse_event);
EXPECT_FALSE(mouse_event.handled());
EXPECT_EQ(base::TimeTicks().ToInternalValue(),

Powered by Google App Engine
This is Rietveld 408576698