Commit 547bc1e3 authored by Fredrik Söderqvist's avatar Fredrik Söderqvist Committed by Commit Bot

Add style-barriers to fast/events/mouse-cursor-image-set{,-svg}.html

This makes sure that the requests for the cursor resources has been
issued before the following loadImages(...) call.

Bug: 1137716, 1138589
Change-Id: I691360327c0d4f70f8eb50fdae224ab53dcc6111
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2479523
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Auto-Submit: Fredrik Söderquist <fs@opera.com>
Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817978}
parent 2d0bf9ec
...@@ -52,6 +52,13 @@ function runTests() { ...@@ -52,6 +52,13 @@ function runTests() {
checkCursors(); checkCursors();
// Repeat in high-dpi mode // Repeat in high-dpi mode
testRunner.setBackingScaleFactor(2, function() { testRunner.setBackingScaleFactor(2, function() {
// Flush style (and layout) to ensure that requests for the (cursor) resources
// referenced by style has been issued. This means that the ordering request performed
// below will be able to re-use the same (internal) resource if it is still pending.
// If the actual cursor request has already completed before the ordering request is
// issued then the ordering request will not re-use the same resource, but ordering is
// still guaranteed in that case.
testContainer.offsetTop;
// Failed images are apparently reset on scale factor change. // Failed images are apparently reset on scale factor change.
loadImages([{ url: 'doesntexist.svg', error: true }], loadImages([{ url: 'doesntexist.svg', error: true }],
function() { function() {
......
...@@ -53,6 +53,13 @@ function runTests() { ...@@ -53,6 +53,13 @@ function runTests() {
checkCursors(); checkCursors();
// Repeat in high-dpi mode // Repeat in high-dpi mode
testRunner.setBackingScaleFactor(2, function() { testRunner.setBackingScaleFactor(2, function() {
// Flush style (and layout) to ensure that requests for the (cursor) resources
// referenced by style has been issued. This means that the ordering request performed
// below will be able to re-use the same (internal) resource if it is still pending.
// If the actual cursor request has already completed before the ordering request is
// issued then the ordering request will not re-use the same resource, but ordering is
// still guaranteed in that case.
testContainer.offsetTop;
// Failed images are apparently reset on scale factor change. // Failed images are apparently reset on scale factor change.
loadImages([{ url: 'doesntexist.png', error: true }], loadImages([{ url: 'doesntexist.png', error: true }],
function() { function() {
......
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