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

Unified Diff: third_party/WebKit/Source/web/tests/WebFrameTest.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/web/tests/WebFrameTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index bdcc8024b1c131dc5e4a7e8e0874b676aed113f0..6035879a10baa4f76c24d1c1208250ba9d1f0151 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -1911,9 +1911,10 @@ TEST_F(WebFrameTest,
ASSERT_NE(nullptr, element);
EXPECT_EQ(String("oldValue"), element->innerText());
- PlatformGestureEvent gestureEvent(
- PlatformEvent::EventType::GestureTap, hitPoint, hitPoint, IntSize(0, 0),
- 0, PlatformEvent::NoModifiers, PlatformGestureSourceTouchscreen);
+ PlatformGestureEvent gestureEvent(PlatformEvent::EventType::GestureTap,
+ hitPoint, hitPoint, IntSize(0, 0),
+ TimeTicks(), PlatformEvent::NoModifiers,
+ PlatformGestureSourceTouchscreen);
webViewHelper.webView()
->mainFrameImpl()
->frame()
@@ -6906,7 +6907,7 @@ TEST_P(ParameterizedWebFrameTest, SimulateFragmentAnchorMiddleClick) {
Event* event = MouseEvent::create(
EventTypeNames::click, false, false, document->domWindow(), 0, 0, 0, 0, 0,
- 0, 0, PlatformEvent::NoModifiers, 1, 0, nullptr, 0,
+ 0, 0, PlatformEvent::NoModifiers, 1, 0, nullptr, TimeTicks(),
PlatformMouseEvent::RealOrIndistinguishable, String(), nullptr);
FrameLoadRequest frameRequest(document, ResourceRequest(destination));
frameRequest.setTriggeringEvent(event);
@@ -6961,7 +6962,7 @@ TEST_P(ParameterizedWebFrameTest, ModifiedClickNewWindow) {
// ctrl+click event
Event* event = MouseEvent::create(
EventTypeNames::click, false, false, document->domWindow(), 0, 0, 0, 0, 0,
- 0, 0, PlatformEvent::CtrlKey, 0, 0, nullptr, 0,
+ 0, 0, PlatformEvent::CtrlKey, 0, 0, nullptr, TimeTicks(),
PlatformMouseEvent::RealOrIndistinguishable, String(), nullptr);
FrameLoadRequest frameRequest(document, ResourceRequest(destination));
frameRequest.setTriggeringEvent(event);
@@ -10784,7 +10785,7 @@ TEST_F(WebFrameTest, MouseOverLinkAndOverlayScrollbar) {
IntPoint(aTag->offsetLeft(), aTag->offsetTop()),
IntPoint(aTag->offsetLeft(), aTag->offsetTop()),
WebPointerProperties::Button::NoButton, PlatformEvent::MouseMoved, 0,
- PlatformEvent::NoModifiers, WTF::monotonicallyIncreasingTime());
+ PlatformEvent::NoModifiers, TimeTicks::Now());
document->frame()->eventHandler().handleMouseMoveEvent(
mouseMoveOverLinkEvent, Vector<PlatformMouseEvent>());
@@ -10797,7 +10798,7 @@ TEST_F(WebFrameTest, MouseOverLinkAndOverlayScrollbar) {
PlatformMouseEvent mouseMoveEvent(
IntPoint(18, aTag->offsetTop()), IntPoint(18, aTag->offsetTop()),
WebPointerProperties::Button::NoButton, PlatformEvent::MouseMoved, 0,
- PlatformEvent::NoModifiers, WTF::monotonicallyIncreasingTime());
+ PlatformEvent::NoModifiers, TimeTicks::Now());
document->frame()->eventHandler().handleMouseMoveEvent(
mouseMoveEvent, Vector<PlatformMouseEvent>());
@@ -10808,8 +10809,7 @@ TEST_F(WebFrameTest, MouseOverLinkAndOverlayScrollbar) {
PlatformMouseEvent mousePressEvent(
IntPoint(18, aTag->offsetTop()), IntPoint(18, aTag->offsetTop()),
WebPointerProperties::Button::Left, PlatformEvent::MousePressed, 0,
- PlatformEvent::Modifiers::LeftButtonDown,
- WTF::monotonicallyIncreasingTime());
+ PlatformEvent::Modifiers::LeftButtonDown, TimeTicks::Now());
document->frame()->eventHandler().handleMousePressEvent(mousePressEvent);
EXPECT_FALSE(document->activeHoverElement());
@@ -10818,8 +10818,7 @@ TEST_F(WebFrameTest, MouseOverLinkAndOverlayScrollbar) {
PlatformMouseEvent MouseReleaseEvent(
IntPoint(18, aTag->offsetTop()), IntPoint(18, aTag->offsetTop()),
WebPointerProperties::Button::Left, PlatformEvent::MouseReleased, 0,
- PlatformEvent::Modifiers::LeftButtonDown,
- WTF::monotonicallyIncreasingTime());
+ PlatformEvent::Modifiers::LeftButtonDown, TimeTicks::Now());
document->frame()->eventHandler().handleMouseReleaseEvent(MouseReleaseEvent);
// Mouse over disabled overlay scrollbar. Mouse cursor should be hand and has
@@ -10875,7 +10874,7 @@ TEST_F(WebFrameTest, MouseOverCustomScrollbar) {
PlatformMouseEvent mouseMoveOverDiv(
IntPoint(1, 1), IntPoint(1, 1), WebPointerProperties::Button::NoButton,
PlatformEvent::MouseMoved, 0, PlatformEvent::NoModifiers,
- WTF::monotonicallyIncreasingTime());
+ TimeTicks::Now());
document->frame()->eventHandler().handleMouseMoveEvent(
mouseMoveOverDiv, Vector<PlatformMouseEvent>());
@@ -10893,7 +10892,7 @@ TEST_F(WebFrameTest, MouseOverCustomScrollbar) {
PlatformMouseEvent mouseMoveOverDivAndScrollbar(
IntPoint(175, 1), IntPoint(175, 1),
WebPointerProperties::Button::NoButton, PlatformEvent::MouseMoved, 0,
- PlatformEvent::NoModifiers, WTF::monotonicallyIncreasingTime());
+ PlatformEvent::NoModifiers, TimeTicks::Now());
document->frame()->eventHandler().handleMouseMoveEvent(
mouseMoveOverDivAndScrollbar, Vector<PlatformMouseEvent>());

Powered by Google App Engine
This is Rietveld 408576698