Index: third_party/WebKit/LayoutTests/fast/events/resources/expect-cursor-update.js |
diff --git a/third_party/WebKit/LayoutTests/fast/events/resources/expect-cursor-update.js b/third_party/WebKit/LayoutTests/fast/events/resources/expect-cursor-update.js |
index ab01bbb715175b4c3ac8e1e41a0310345f067e9f..269951779e83bf30b72b5aa28e2ebc93564faf85 100644 |
--- a/third_party/WebKit/LayoutTests/fast/events/resources/expect-cursor-update.js |
+++ b/third_party/WebKit/LayoutTests/fast/events/resources/expect-cursor-update.js |
@@ -19,3 +19,22 @@ function expectCursorUpdate(expectedInfo, completion) { |
requestAnimationFrame(onFrame); |
}); |
} |
+ |
+function expectSendFakeMouseMove(expectedInfo, completion) { |
+ // Need to give style application a chance to take effect first. |
+ requestAnimationFrame(function() { |
+ // Note that fakeMouseMovePending should (almost?) always be true at this |
+ // point, but we probably shouldn't depend on that in case scheduler changes |
+ // result in rAF not firing until after the fake_mouse_move_event_timer_ as |
+ // already fired. |
+ var onFrame = function() { |
+ if (internals.fakeMouseMovePending) { |
+ requestAnimationFrame(onFrame); |
+ } else { |
+ shouldBeEqualToString('internals.getCurrentCursorInfo()', expectedInfo); |
+ completion(); |
+ } |
+ } |
+ requestAnimationFrame(onFrame); |
+ }); |
+} |