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

Unified Diff: ui/events/event_unittest.cc

Issue 1617863002: Set the correct pressure for pointer events based on force (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applying comments Created 4 years, 11 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.h ('k') | ui/events/test/event_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_unittest.cc
diff --git a/ui/events/event_unittest.cc b/ui/events/event_unittest.cc
index 1e9eebbeeb7f662ead345dbf53f6c22636a13ff2..5f1ffdfd22994dc8a33d2235fd0e270a94f58688 100644
--- a/ui/events/event_unittest.cc
+++ b/ui/events/event_unittest.cc
@@ -625,7 +625,7 @@ TEST(EventTest, PointerEventDetailsTouch) {
touch_event_plain.pointer_details().pointer_type());
EXPECT_EQ(0.0f, touch_event_plain.pointer_details().radius_x());
EXPECT_EQ(0.0f, touch_event_plain.pointer_details().radius_y());
- EXPECT_EQ(0.0f, touch_event_plain.pointer_details().force());
+ EXPECT_TRUE(std::isnan(touch_event_plain.pointer_details().force()));
EXPECT_EQ(0.0f, touch_event_plain.pointer_details().tilt_x());
EXPECT_EQ(0.0f, touch_event_plain.pointer_details().tilt_y());
@@ -659,7 +659,7 @@ TEST(EventTest, PointerEventDetailsMouse) {
mouse_event.pointer_details().pointer_type());
EXPECT_EQ(0.0f, mouse_event.pointer_details().radius_x());
EXPECT_EQ(0.0f, mouse_event.pointer_details().radius_y());
- EXPECT_EQ(0.0f, mouse_event.pointer_details().force());
+ EXPECT_TRUE(std::isnan(mouse_event.pointer_details().force()));
EXPECT_EQ(0.0f, mouse_event.pointer_details().tilt_x());
EXPECT_EQ(0.0f, mouse_event.pointer_details().tilt_y());
@@ -668,7 +668,7 @@ TEST(EventTest, PointerEventDetailsMouse) {
mouse_event_copy.pointer_details().pointer_type());
EXPECT_EQ(0.0f, mouse_event_copy.pointer_details().radius_x());
EXPECT_EQ(0.0f, mouse_event_copy.pointer_details().radius_y());
- EXPECT_EQ(0.0f, mouse_event_copy.pointer_details().force());
+ EXPECT_TRUE(std::isnan(mouse_event_copy.pointer_details().force()));
EXPECT_EQ(0.0f, mouse_event_copy.pointer_details().tilt_x());
EXPECT_EQ(0.0f, mouse_event_copy.pointer_details().tilt_y());
}
« no previous file with comments | « ui/events/event.h ('k') | ui/events/test/event_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698