Commit dfdb0486 authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Fix flaky mouse cursor change test

The image source may not get loaded immediately so the size was reported
as 0x0. Turn test into one that waits for the expected condition or
timesout.

BUG=652536

Change-Id: I0213383a7678f120cab8b0a55c4f10639183aaad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2121079
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatarMustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753664}
parent f3788429
......@@ -2027,7 +2027,6 @@ crbug.com/613672 [ Mac ] virtual/threaded/synthetic_gestures/synthetic-pinch-zoo
crbug.com/613672 [ Mac ] virtual/threaded/synthetic_gestures/synthetic-pinch-zoom-gesture-touchscreen-zoom-in-slow-desktop.html [ Skip ]
crbug.com/613672 [ Mac ] virtual/threaded/synthetic_gestures/synthetic-pinch-zoom-gesture-touchscreen-desktop.html [ Skip ]
crbug.com/652536 fast/events/mouse-cursor-change-after-image-load.html [ Failure Pass Crash ]
crbug.com/520188 [ Win ] http/tests/local/fileapi/file-last-modified-after-delete.html [ Failure Pass ]
crbug.com/520611 [ Debug ] fast/filesystem/workers/file-writer-events-shared-worker.html [ Failure Pass ]
crbug.com/520194 http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overridesexpires.html [ Failure Pass ]
......
......@@ -34,10 +34,8 @@ cursorTest.step(function() {
}
function testSetCursorImage(url, expectedCursorInfo, complete) {
const currentCursorInfo = internals.getCurrentCursorInfo();
target.style.cursor = `url(${url}),auto`;
waitForCondition(() => internals.getCurrentCursorInfo() != currentCursorInfo, cursorTest.step_func(() => {
assert_equals(internals.getCurrentCursorInfo(), expectedCursorInfo);
waitForCondition(() => internals.getCurrentCursorInfo() != expectedCursorInfo, cursorTest.step_func(() => {
complete();
}));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment