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

Unified Diff: third_party/WebKit/Source/core/input/EventHandlerTest.cpp

Issue 2542693002: Use WTF::TimeTicks to represent timestamp in Platform/Core event types (Closed)
Patch Set: rebase Created 4 years 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: third_party/WebKit/Source/core/input/EventHandlerTest.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandlerTest.cpp b/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
index fb48cc0a09e3c5090b279c0fd5f421499f84b904..dcb507f81d02d377a5aa881e5592712b6916a6b6 100644
--- a/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
@@ -40,7 +40,7 @@ class TapEventBuilder : public PlatformGestureEvent {
position,
position,
IntSize(5, 5),
- WTF::monotonicallyIncreasingTime(),
+ TimeTicks::Now(),
static_cast<PlatformEvent::Modifiers>(0),
PlatformGestureSourceTouchscreen) {
m_data.m_tap.m_tapCount = tapCount;
@@ -78,13 +78,13 @@ TEST_F(EventHandlerTest, dragSelectionAfterScroll) {
PlatformMouseEvent mouseDownEvent(
IntPoint(0, 0), IntPoint(100, 200), WebPointerProperties::Button::Left,
PlatformEvent::MousePressed, 1, PlatformEvent::Modifiers::LeftButtonDown,
- WTF::monotonicallyIncreasingTime());
+ TimeTicks::Now());
document().frame()->eventHandler().handleMousePressEvent(mouseDownEvent);
PlatformMouseEvent mouseMoveEvent(
IntPoint(100, 50), IntPoint(200, 250), WebPointerProperties::Button::Left,
PlatformEvent::MouseMoved, 1, PlatformEvent::Modifiers::LeftButtonDown,
- WTF::monotonicallyIncreasingTime());
+ TimeTicks::Now());
document().frame()->eventHandler().handleMouseMoveEvent(
mouseMoveEvent, Vector<PlatformMouseEvent>());
@@ -95,7 +95,7 @@ TEST_F(EventHandlerTest, dragSelectionAfterScroll) {
PlatformMouseEvent mouseUpEvent(
IntPoint(100, 50), IntPoint(200, 250), WebPointerProperties::Button::Left,
PlatformEvent::MouseReleased, 1, static_cast<PlatformEvent::Modifiers>(0),
- WTF::monotonicallyIncreasingTime());
+ TimeTicks::Now());
document().frame()->eventHandler().handleMouseReleaseEvent(mouseUpEvent);
FrameSelection& selection = document().frame()->selection();
@@ -182,14 +182,13 @@ TEST_F(EventHandlerTest, draggedInlinePositionTest) {
PlatformMouseEvent mouseDownEvent(
IntPoint(262, 29), IntPoint(329, 67), WebPointerProperties::Button::Left,
PlatformEvent::MousePressed, 1, PlatformEvent::Modifiers::LeftButtonDown,
- WTF::monotonicallyIncreasingTime());
+ TimeTicks::Now());
document().frame()->eventHandler().handleMousePressEvent(mouseDownEvent);
- PlatformMouseEvent mouseMoveEvent(IntPoint(618, 298), IntPoint(685, 436),
- WebPointerProperties::Button::Left,
- PlatformEvent::MouseMoved, 1,
- PlatformEvent::Modifiers::LeftButtonDown,
- WTF::monotonicallyIncreasingTime());
+ PlatformMouseEvent mouseMoveEvent(
+ IntPoint(618, 298), IntPoint(685, 436),
+ WebPointerProperties::Button::Left, PlatformEvent::MouseMoved, 1,
+ PlatformEvent::Modifiers::LeftButtonDown, TimeTicks::Now());
document().frame()->eventHandler().handleMouseMoveEvent(
mouseMoveEvent, Vector<PlatformMouseEvent>());
@@ -212,18 +211,16 @@ TEST_F(EventHandlerTest, draggedSVGImagePositionTest) {
"draggable='true'/>"
"</svg>"
"</div>");
- PlatformMouseEvent mouseDownEvent(IntPoint(145, 144), IntPoint(212, 282),
- WebPointerProperties::Button::Left,
- PlatformEvent::MousePressed, 1,
- PlatformEvent::Modifiers::LeftButtonDown,
- WTF::monotonicallyIncreasingTime());
+ PlatformMouseEvent mouseDownEvent(
+ IntPoint(145, 144), IntPoint(212, 282),
+ WebPointerProperties::Button::Left, PlatformEvent::MousePressed, 1,
+ PlatformEvent::Modifiers::LeftButtonDown, TimeTicks::Now());
document().frame()->eventHandler().handleMousePressEvent(mouseDownEvent);
- PlatformMouseEvent mouseMoveEvent(IntPoint(618, 298), IntPoint(685, 436),
- WebPointerProperties::Button::Left,
- PlatformEvent::MouseMoved, 1,
- PlatformEvent::Modifiers::LeftButtonDown,
- WTF::monotonicallyIncreasingTime());
+ PlatformMouseEvent mouseMoveEvent(
+ IntPoint(618, 298), IntPoint(685, 436),
+ WebPointerProperties::Button::Left, PlatformEvent::MouseMoved, 1,
+ PlatformEvent::Modifiers::LeftButtonDown, TimeTicks::Now());
document().frame()->eventHandler().handleMouseMoveEvent(
mouseMoveEvent, Vector<PlatformMouseEvent>());
@@ -252,7 +249,7 @@ TEST_F(EventHandlerTest, sendContextMenuEventWithHover) {
PlatformMouseEvent mouseDownEvent(
IntPoint(0, 0), IntPoint(100, 200), WebPointerProperties::Button::Right,
PlatformEvent::MousePressed, 1, PlatformEvent::Modifiers::RightButtonDown,
- WTF::monotonicallyIncreasingTime());
+ TimeTicks::Now());
EXPECT_EQ(
WebInputEventResult::HandledApplication,
document().frame()->eventHandler().sendContextMenuEvent(mouseDownEvent));
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/core/input/GestureManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698