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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/resources/expect-cursor-update.js

Issue 2956023004: Add a flag to update hover effect when a layout is changed (Closed)
Patch Set: Remove pause in test Created 3 years, 5 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
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);
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698