Commit 8cc2602c authored by Fredrik Söderqvist's avatar Fredrik Söderqvist Committed by Commit Bot

Add test for crbug.com/1138488

This might have caught the regression found by said bug (hot-spot
clamped by unscaled image dimensions).

Bug: 1138488
Change-Id: Ib31b78b00d25f84476d65886090d8c3a44aef32e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2475881Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#817535}
parent a88c74f2
...@@ -42,6 +42,10 @@ TEST CASE: Explicit hotspot at (5,3) logical in 1x and 2x ...@@ -42,6 +42,10 @@ TEST CASE: Explicit hotspot at (5,3) logical in 1x and 2x
Cursor Info: type=Custom hotSpot=5,3 image=25x25 Cursor Info: type=Custom hotSpot=5,3 image=25x25
TEST CASE: Explicit hotspot at (5,24) logical in 1x
Cursor Info: type=Custom hotSpot=5,24 image=25x25
TEST CASE: Explicit hotspot at (7,3) logical in 0.7x and 1.4x - should round to nearest integer TEST CASE: Explicit hotspot at (7,3) logical in 0.7x and 1.4x - should round to nearest integer
Cursor Info: type=Custom hotSpot=10,4 image=30x30 scale=1.4 Cursor Info: type=Custom hotSpot=10,4 image=30x30 scale=1.4
...@@ -84,6 +88,10 @@ TEST CASE: Explicit hotspot at (5,3) logical in 1x and 2x ...@@ -84,6 +88,10 @@ TEST CASE: Explicit hotspot at (5,3) logical in 1x and 2x
Cursor Info: type=Custom hotSpot=20,12 image=60x60 scale=4 Cursor Info: type=Custom hotSpot=20,12 image=60x60 scale=4
TEST CASE: Explicit hotspot at (5,24) logical in 1x
Cursor Info: type=Custom hotSpot=10,48 image=50x50 scale=2
TEST CASE: Explicit hotspot at (7,3) logical in 0.7x and 1.4x - should round to nearest integer TEST CASE: Explicit hotspot at (7,3) logical in 0.7x and 1.4x - should round to nearest integer
Cursor Info: type=Custom hotSpot=20,8 image=60x60 scale=2.8 Cursor Info: type=Custom hotSpot=20,8 image=60x60 scale=2.8
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<div style='cursor: -webkit-image-set(url(resources/greenbox200.svg) 4x), pointer'>200x200 image at 4x (not over-large in UI pixels)</div> <div style='cursor: -webkit-image-set(url(resources/greenbox200.svg) 4x), pointer'>200x200 image at 4x (not over-large in UI pixels)</div>
<div style='cursor: -webkit-image-set(url(doesntexist.svg) 1x), url(resources/greenbox.svg), pointer'>Non-existent image in image-set with fallback to 25x25 image</div> <div style='cursor: -webkit-image-set(url(doesntexist.svg) 1x), url(resources/greenbox.svg), pointer'>Non-existent image in image-set with fallback to 25x25 image</div>
<div style='cursor: -webkit-image-set(url(resources/greenbox.svg) 1x, url(resources/greenbox30.svg) 2x) 5 3, pointer'>Explicit hotspot at (5,3) logical in 1x and 2x</div> <div style='cursor: -webkit-image-set(url(resources/greenbox.svg) 1x, url(resources/greenbox30.svg) 2x) 5 3, pointer'>Explicit hotspot at (5,3) logical in 1x and 2x</div>
<div style='cursor: -webkit-image-set(url(resources/greenbox.svg) 1x) 5 24, pointer'>Explicit hotspot at (5,24) logical in 1x</div>
<div style='cursor: -webkit-image-set(url(resources/greenbox.svg) 0.7x, url(resources/greenbox30.svg) 1.4x) 7 3, pointer'>Explicit hotspot at (7,3) logical in 0.7x and 1.4x - should round to nearest integer</div> <div style='cursor: -webkit-image-set(url(resources/greenbox.svg) 0.7x, url(resources/greenbox30.svg) 1.4x) 7 3, pointer'>Explicit hotspot at (7,3) logical in 0.7x and 1.4x - should round to nearest integer</div>
</div> </div>
<br/> <br/>
......
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