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

Unified Diff: content/browser/renderer_host/input/input_router_impl_unittest.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-event: mandol_line Created 5 years, 1 month 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: content/browser/renderer_host/input/input_router_impl_unittest.cc
diff --git a/content/browser/renderer_host/input/input_router_impl_unittest.cc b/content/browser/renderer_host/input/input_router_impl_unittest.cc
index 2460f3f693a033f15306fdd96977e4850a32aa6d..554ce74af2c58faafc2b4ab2226c61e71de2316b 100644
--- a/content/browser/renderer_host/input/input_router_impl_unittest.cc
+++ b/content/browser/renderer_host/input/input_router_impl_unittest.cc
@@ -858,8 +858,8 @@ TEST_F(InputRouterImplTest, AckedTouchEventState) {
SetTouchTimestamp(timestamp);
uint32 touch_press_event_id1 = SendTouchEvent();
EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
- expected_events.push_back(new ui::TouchEvent(
- ui::ET_TOUCH_PRESSED, gfx::PointF(1.f, 1.f), 0, timestamp));
+ expected_events.push_back(
+ new ui::TouchEvent(ui::ET_TOUCH_PRESSED, gfx::Point(1, 1), 0, timestamp));
// Move the finger.
timestamp += base::TimeDelta::FromSeconds(10);
@@ -868,7 +868,7 @@ TEST_F(InputRouterImplTest, AckedTouchEventState) {
uint32 touch_move_event_id1 = SendTouchEvent();
EXPECT_FALSE(TouchEventQueueEmpty());
expected_events.push_back(new ui::TouchEvent(
- ui::ET_TOUCH_MOVED, gfx::PointF(500.f, 500.f), 0, timestamp));
+ ui::ET_TOUCH_MOVED, gfx::Point(500, 500), 0, timestamp));
// Now press a second finger.
timestamp += base::TimeDelta::FromSeconds(10);
@@ -876,8 +876,8 @@ TEST_F(InputRouterImplTest, AckedTouchEventState) {
SetTouchTimestamp(timestamp);
uint32 touch_press_event_id2 = SendTouchEvent();
EXPECT_FALSE(TouchEventQueueEmpty());
- expected_events.push_back(new ui::TouchEvent(
- ui::ET_TOUCH_PRESSED, gfx::PointF(2.f, 2.f), 1, timestamp));
+ expected_events.push_back(
+ new ui::TouchEvent(ui::ET_TOUCH_PRESSED, gfx::Point(2, 2), 1, timestamp));
// Move both fingers.
timestamp += base::TimeDelta::FromSeconds(10);
@@ -886,10 +886,10 @@ TEST_F(InputRouterImplTest, AckedTouchEventState) {
SetTouchTimestamp(timestamp);
uint32 touch_move_event_id2 = SendTouchEvent();
EXPECT_FALSE(TouchEventQueueEmpty());
- expected_events.push_back(new ui::TouchEvent(
- ui::ET_TOUCH_MOVED, gfx::PointF(10.f, 10.f), 0, timestamp));
- expected_events.push_back(new ui::TouchEvent(
- ui::ET_TOUCH_MOVED, gfx::PointF(20.f, 20.f), 1, timestamp));
+ expected_events.push_back(
+ new ui::TouchEvent(ui::ET_TOUCH_MOVED, gfx::Point(10, 10), 0, timestamp));
+ expected_events.push_back(
+ new ui::TouchEvent(ui::ET_TOUCH_MOVED, gfx::Point(20, 20), 1, timestamp));
// Receive the ACKs and make sure the generated events from the acked events
// are correct.

Powered by Google App Engine
This is Rietveld 408576698