From 2113a18a18a81e4df2e92138ee44cad8e5a3c330 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 21 Oct 2021 03:32:32 +0200 Subject: [PATCH] testsuite: Add lots of reftests for picture sizing Have square images in the following sizes: * 20 * 100 * 150 * 200 * 300 and place them in a can-shrink Picture allocated at the sizes: * 200x100 * 100x200 and set align to center/center. That's 10 combinations and they should all do the right thing. --- ...nter-center-100x100-picture-in-100x200.css | 15 +++++++++ ...r-center-100x100-picture-in-100x200.ref.ui | 9 ++++++ ...enter-center-100x100-picture-in-100x200.ui | 24 ++++++++++++++ ...nter-center-100x100-picture-in-200x100.css | 15 +++++++++ ...r-center-100x100-picture-in-200x100.ref.ui | 9 ++++++ ...enter-center-100x100-picture-in-200x100.ui | 24 ++++++++++++++ ...nter-center-150x150-picture-in-100x200.css | 15 +++++++++ ...r-center-150x150-picture-in-100x200.ref.ui | 9 ++++++ ...enter-center-150x150-picture-in-100x200.ui | 24 ++++++++++++++ ...nter-center-150x150-picture-in-200x100.css | 15 +++++++++ ...r-center-150x150-picture-in-200x100.ref.ui | 9 ++++++ ...enter-center-150x150-picture-in-200x100.ui | 24 ++++++++++++++ ...nter-center-200x200-picture-in-100x200.css | 15 +++++++++ ...r-center-200x200-picture-in-100x200.ref.ui | 9 ++++++ ...enter-center-200x200-picture-in-100x200.ui | 24 ++++++++++++++ ...nter-center-200x200-picture-in-200x100.css | 15 +++++++++ ...r-center-200x200-picture-in-200x100.ref.ui | 9 ++++++ ...enter-center-200x200-picture-in-200x100.ui | 24 ++++++++++++++ ...center-center-20x20-picture-in-100x200.css | 15 +++++++++ ...ter-center-20x20-picture-in-100x200.ref.ui | 9 ++++++ .../center-center-20x20-picture-in-100x200.ui | 24 ++++++++++++++ ...center-center-20x20-picture-in-200x100.css | 15 +++++++++ ...ter-center-20x20-picture-in-200x100.ref.ui | 9 ++++++ .../center-center-20x20-picture-in-200x100.ui | 24 ++++++++++++++ ...nter-center-300x300-picture-in-100x200.css | 15 +++++++++ ...r-center-300x300-picture-in-100x200.ref.ui | 9 ++++++ ...enter-center-300x300-picture-in-100x200.ui | 24 ++++++++++++++ ...nter-center-300x300-picture-in-200x100.css | 15 +++++++++ ...r-center-300x300-picture-in-200x100.ref.ui | 9 ++++++ ...enter-center-300x300-picture-in-200x100.ui | 24 ++++++++++++++ testsuite/reftests/green-100x100.png | Bin 0 -> 215 bytes testsuite/reftests/green-150x150.png | Bin 0 -> 296 bytes testsuite/reftests/green-200x200.png | Bin 0 -> 427 bytes testsuite/reftests/green-300x300.png | Bin 0 -> 687 bytes testsuite/reftests/meson.build | 30 ++++++++++++++++++ 35 files changed, 510 insertions(+) create mode 100644 testsuite/reftests/center-center-100x100-picture-in-100x200.css create mode 100644 testsuite/reftests/center-center-100x100-picture-in-100x200.ref.ui create mode 100644 testsuite/reftests/center-center-100x100-picture-in-100x200.ui create mode 100644 testsuite/reftests/center-center-100x100-picture-in-200x100.css create mode 100644 testsuite/reftests/center-center-100x100-picture-in-200x100.ref.ui create mode 100644 testsuite/reftests/center-center-100x100-picture-in-200x100.ui create mode 100644 testsuite/reftests/center-center-150x150-picture-in-100x200.css create mode 100644 testsuite/reftests/center-center-150x150-picture-in-100x200.ref.ui create mode 100644 testsuite/reftests/center-center-150x150-picture-in-100x200.ui create mode 100644 testsuite/reftests/center-center-150x150-picture-in-200x100.css create mode 100644 testsuite/reftests/center-center-150x150-picture-in-200x100.ref.ui create mode 100644 testsuite/reftests/center-center-150x150-picture-in-200x100.ui create mode 100644 testsuite/reftests/center-center-200x200-picture-in-100x200.css create mode 100644 testsuite/reftests/center-center-200x200-picture-in-100x200.ref.ui create mode 100644 testsuite/reftests/center-center-200x200-picture-in-100x200.ui create mode 100644 testsuite/reftests/center-center-200x200-picture-in-200x100.css create mode 100644 testsuite/reftests/center-center-200x200-picture-in-200x100.ref.ui create mode 100644 testsuite/reftests/center-center-200x200-picture-in-200x100.ui create mode 100644 testsuite/reftests/center-center-20x20-picture-in-100x200.css create mode 100644 testsuite/reftests/center-center-20x20-picture-in-100x200.ref.ui create mode 100644 testsuite/reftests/center-center-20x20-picture-in-100x200.ui create mode 100644 testsuite/reftests/center-center-20x20-picture-in-200x100.css create mode 100644 testsuite/reftests/center-center-20x20-picture-in-200x100.ref.ui create mode 100644 testsuite/reftests/center-center-20x20-picture-in-200x100.ui create mode 100644 testsuite/reftests/center-center-300x300-picture-in-100x200.css create mode 100644 testsuite/reftests/center-center-300x300-picture-in-100x200.ref.ui create mode 100644 testsuite/reftests/center-center-300x300-picture-in-100x200.ui create mode 100644 testsuite/reftests/center-center-300x300-picture-in-200x100.css create mode 100644 testsuite/reftests/center-center-300x300-picture-in-200x100.ref.ui create mode 100644 testsuite/reftests/center-center-300x300-picture-in-200x100.ui create mode 100644 testsuite/reftests/green-100x100.png create mode 100644 testsuite/reftests/green-150x150.png create mode 100644 testsuite/reftests/green-200x200.png create mode 100644 testsuite/reftests/green-300x300.png diff --git a/testsuite/reftests/center-center-100x100-picture-in-100x200.css b/testsuite/reftests/center-center-100x100-picture-in-100x200.css new file mode 100644 index 0000000000..e496fc2d82 --- /dev/null +++ b/testsuite/reftests/center-center-100x100-picture-in-100x200.css @@ -0,0 +1,15 @@ +* { + all: unset; + background-color: mintcream; +} + +picture { + background-color: firebrick; +} + +#reference { + background-image: image(lime); + background-repeat: no-repeat; + background-position: center; + background-size: 100px 100px; +} diff --git a/testsuite/reftests/center-center-100x100-picture-in-100x200.ref.ui b/testsuite/reftests/center-center-100x100-picture-in-100x200.ref.ui new file mode 100644 index 0000000000..9521d560cb --- /dev/null +++ b/testsuite/reftests/center-center-100x100-picture-in-100x200.ref.ui @@ -0,0 +1,9 @@ + + + + 100 + 200 + reference + 0 + + diff --git a/testsuite/reftests/center-center-100x100-picture-in-100x200.ui b/testsuite/reftests/center-center-100x100-picture-in-100x200.ui new file mode 100644 index 0000000000..5826455256 --- /dev/null +++ b/testsuite/reftests/center-center-100x100-picture-in-100x200.ui @@ -0,0 +1,24 @@ + + + + 100 + 200 + 0 + + + + + green-100x100.png + 0 + 1 + center + center + + 0 + + + + + + + diff --git a/testsuite/reftests/center-center-100x100-picture-in-200x100.css b/testsuite/reftests/center-center-100x100-picture-in-200x100.css new file mode 100644 index 0000000000..e496fc2d82 --- /dev/null +++ b/testsuite/reftests/center-center-100x100-picture-in-200x100.css @@ -0,0 +1,15 @@ +* { + all: unset; + background-color: mintcream; +} + +picture { + background-color: firebrick; +} + +#reference { + background-image: image(lime); + background-repeat: no-repeat; + background-position: center; + background-size: 100px 100px; +} diff --git a/testsuite/reftests/center-center-100x100-picture-in-200x100.ref.ui b/testsuite/reftests/center-center-100x100-picture-in-200x100.ref.ui new file mode 100644 index 0000000000..e06f2b02dd --- /dev/null +++ b/testsuite/reftests/center-center-100x100-picture-in-200x100.ref.ui @@ -0,0 +1,9 @@ + + + + 200 + 100 + reference + 0 + + diff --git a/testsuite/reftests/center-center-100x100-picture-in-200x100.ui b/testsuite/reftests/center-center-100x100-picture-in-200x100.ui new file mode 100644 index 0000000000..06a17662a3 --- /dev/null +++ b/testsuite/reftests/center-center-100x100-picture-in-200x100.ui @@ -0,0 +1,24 @@ + + + + 200 + 100 + 0 + + + + + green-100x100.png + 0 + 1 + center + center + + 0 + + + + + + + diff --git a/testsuite/reftests/center-center-150x150-picture-in-100x200.css b/testsuite/reftests/center-center-150x150-picture-in-100x200.css new file mode 100644 index 0000000000..adbc2cbedc --- /dev/null +++ b/testsuite/reftests/center-center-150x150-picture-in-100x200.css @@ -0,0 +1,15 @@ +* { + all: unset; + background-color: mintcream; +} + +picture { + background-color: firebrick; +} + +#reference { + background-image: image(lime); + background-repeat: no-repeat; + background-position: center; + background-size: 150px 150px; +} diff --git a/testsuite/reftests/center-center-150x150-picture-in-100x200.ref.ui b/testsuite/reftests/center-center-150x150-picture-in-100x200.ref.ui new file mode 100644 index 0000000000..9521d560cb --- /dev/null +++ b/testsuite/reftests/center-center-150x150-picture-in-100x200.ref.ui @@ -0,0 +1,9 @@ + + + + 100 + 200 + reference + 0 + + diff --git a/testsuite/reftests/center-center-150x150-picture-in-100x200.ui b/testsuite/reftests/center-center-150x150-picture-in-100x200.ui new file mode 100644 index 0000000000..9f02233bbd --- /dev/null +++ b/testsuite/reftests/center-center-150x150-picture-in-100x200.ui @@ -0,0 +1,24 @@ + + + + 100 + 200 + 0 + + + + + green-150x150.png + 0 + 1 + center + center + + 0 + + + + + + + diff --git a/testsuite/reftests/center-center-150x150-picture-in-200x100.css b/testsuite/reftests/center-center-150x150-picture-in-200x100.css new file mode 100644 index 0000000000..adbc2cbedc --- /dev/null +++ b/testsuite/reftests/center-center-150x150-picture-in-200x100.css @@ -0,0 +1,15 @@ +* { + all: unset; + background-color: mintcream; +} + +picture { + background-color: firebrick; +} + +#reference { + background-image: image(lime); + background-repeat: no-repeat; + background-position: center; + background-size: 150px 150px; +} diff --git a/testsuite/reftests/center-center-150x150-picture-in-200x100.ref.ui b/testsuite/reftests/center-center-150x150-picture-in-200x100.ref.ui new file mode 100644 index 0000000000..e06f2b02dd --- /dev/null +++ b/testsuite/reftests/center-center-150x150-picture-in-200x100.ref.ui @@ -0,0 +1,9 @@ + + + + 200 + 100 + reference + 0 + + diff --git a/testsuite/reftests/center-center-150x150-picture-in-200x100.ui b/testsuite/reftests/center-center-150x150-picture-in-200x100.ui new file mode 100644 index 0000000000..1213e9249e --- /dev/null +++ b/testsuite/reftests/center-center-150x150-picture-in-200x100.ui @@ -0,0 +1,24 @@ + + + + 200 + 100 + 0 + + + + + green-150x150.png + 0 + 1 + center + center + + 0 + + + + + + + diff --git a/testsuite/reftests/center-center-200x200-picture-in-100x200.css b/testsuite/reftests/center-center-200x200-picture-in-100x200.css new file mode 100644 index 0000000000..cb3b17ba09 --- /dev/null +++ b/testsuite/reftests/center-center-200x200-picture-in-100x200.css @@ -0,0 +1,15 @@ +* { + all: unset; + background-color: mintcream; +} + +picture { + background-color: firebrick; +} + +#reference { + background-image: image(lime); + background-repeat: no-repeat; + background-position: center; + background-size: 200px 200px; +} diff --git a/testsuite/reftests/center-center-200x200-picture-in-100x200.ref.ui b/testsuite/reftests/center-center-200x200-picture-in-100x200.ref.ui new file mode 100644 index 0000000000..9521d560cb --- /dev/null +++ b/testsuite/reftests/center-center-200x200-picture-in-100x200.ref.ui @@ -0,0 +1,9 @@ + + + + 100 + 200 + reference + 0 + + diff --git a/testsuite/reftests/center-center-200x200-picture-in-100x200.ui b/testsuite/reftests/center-center-200x200-picture-in-100x200.ui new file mode 100644 index 0000000000..f15b48b5d5 --- /dev/null +++ b/testsuite/reftests/center-center-200x200-picture-in-100x200.ui @@ -0,0 +1,24 @@ + + + + 100 + 200 + 0 + + + + + green-200x200.png + 0 + 1 + center + center + + 0 + + + + + + + diff --git a/testsuite/reftests/center-center-200x200-picture-in-200x100.css b/testsuite/reftests/center-center-200x200-picture-in-200x100.css new file mode 100644 index 0000000000..cb3b17ba09 --- /dev/null +++ b/testsuite/reftests/center-center-200x200-picture-in-200x100.css @@ -0,0 +1,15 @@ +* { + all: unset; + background-color: mintcream; +} + +picture { + background-color: firebrick; +} + +#reference { + background-image: image(lime); + background-repeat: no-repeat; + background-position: center; + background-size: 200px 200px; +} diff --git a/testsuite/reftests/center-center-200x200-picture-in-200x100.ref.ui b/testsuite/reftests/center-center-200x200-picture-in-200x100.ref.ui new file mode 100644 index 0000000000..e06f2b02dd --- /dev/null +++ b/testsuite/reftests/center-center-200x200-picture-in-200x100.ref.ui @@ -0,0 +1,9 @@ + + + + 200 + 100 + reference + 0 + + diff --git a/testsuite/reftests/center-center-200x200-picture-in-200x100.ui b/testsuite/reftests/center-center-200x200-picture-in-200x100.ui new file mode 100644 index 0000000000..6e787008fa --- /dev/null +++ b/testsuite/reftests/center-center-200x200-picture-in-200x100.ui @@ -0,0 +1,24 @@ + + + + 200 + 100 + 0 + + + + + green-200x200.png + 0 + 1 + center + center + + 0 + + + + + + + diff --git a/testsuite/reftests/center-center-20x20-picture-in-100x200.css b/testsuite/reftests/center-center-20x20-picture-in-100x200.css new file mode 100644 index 0000000000..2756ae7d64 --- /dev/null +++ b/testsuite/reftests/center-center-20x20-picture-in-100x200.css @@ -0,0 +1,15 @@ +* { + all: unset; + background-color: mintcream; +} + +picture { + background-color: firebrick; +} + +#reference { + background-image: image(lime); + background-repeat: no-repeat; + background-position: center; + background-size: 20px 20px; +} diff --git a/testsuite/reftests/center-center-20x20-picture-in-100x200.ref.ui b/testsuite/reftests/center-center-20x20-picture-in-100x200.ref.ui new file mode 100644 index 0000000000..9521d560cb --- /dev/null +++ b/testsuite/reftests/center-center-20x20-picture-in-100x200.ref.ui @@ -0,0 +1,9 @@ + + + + 100 + 200 + reference + 0 + + diff --git a/testsuite/reftests/center-center-20x20-picture-in-100x200.ui b/testsuite/reftests/center-center-20x20-picture-in-100x200.ui new file mode 100644 index 0000000000..55177f2749 --- /dev/null +++ b/testsuite/reftests/center-center-20x20-picture-in-100x200.ui @@ -0,0 +1,24 @@ + + + + 100 + 200 + 0 + + + + + green-20x20.png + 0 + 1 + center + center + + 0 + + + + + + + diff --git a/testsuite/reftests/center-center-20x20-picture-in-200x100.css b/testsuite/reftests/center-center-20x20-picture-in-200x100.css new file mode 100644 index 0000000000..2756ae7d64 --- /dev/null +++ b/testsuite/reftests/center-center-20x20-picture-in-200x100.css @@ -0,0 +1,15 @@ +* { + all: unset; + background-color: mintcream; +} + +picture { + background-color: firebrick; +} + +#reference { + background-image: image(lime); + background-repeat: no-repeat; + background-position: center; + background-size: 20px 20px; +} diff --git a/testsuite/reftests/center-center-20x20-picture-in-200x100.ref.ui b/testsuite/reftests/center-center-20x20-picture-in-200x100.ref.ui new file mode 100644 index 0000000000..e06f2b02dd --- /dev/null +++ b/testsuite/reftests/center-center-20x20-picture-in-200x100.ref.ui @@ -0,0 +1,9 @@ + + + + 200 + 100 + reference + 0 + + diff --git a/testsuite/reftests/center-center-20x20-picture-in-200x100.ui b/testsuite/reftests/center-center-20x20-picture-in-200x100.ui new file mode 100644 index 0000000000..e5835423fb --- /dev/null +++ b/testsuite/reftests/center-center-20x20-picture-in-200x100.ui @@ -0,0 +1,24 @@ + + + + 200 + 100 + 0 + + + + + green-20x20.png + 0 + 1 + center + center + + 0 + + + + + + + diff --git a/testsuite/reftests/center-center-300x300-picture-in-100x200.css b/testsuite/reftests/center-center-300x300-picture-in-100x200.css new file mode 100644 index 0000000000..5b067dd562 --- /dev/null +++ b/testsuite/reftests/center-center-300x300-picture-in-100x200.css @@ -0,0 +1,15 @@ +* { + all: unset; + background-color: mintcream; +} + +picture { + background-color: firebrick; +} + +#reference { + background-image: image(lime); + background-repeat: no-repeat; + background-position: center; + background-size: 300px 300px; +} diff --git a/testsuite/reftests/center-center-300x300-picture-in-100x200.ref.ui b/testsuite/reftests/center-center-300x300-picture-in-100x200.ref.ui new file mode 100644 index 0000000000..9521d560cb --- /dev/null +++ b/testsuite/reftests/center-center-300x300-picture-in-100x200.ref.ui @@ -0,0 +1,9 @@ + + + + 100 + 200 + reference + 0 + + diff --git a/testsuite/reftests/center-center-300x300-picture-in-100x200.ui b/testsuite/reftests/center-center-300x300-picture-in-100x200.ui new file mode 100644 index 0000000000..2fff2c91d3 --- /dev/null +++ b/testsuite/reftests/center-center-300x300-picture-in-100x200.ui @@ -0,0 +1,24 @@ + + + + 100 + 200 + 0 + + + + + green-300x300.png + 0 + 1 + center + center + + 0 + + + + + + + diff --git a/testsuite/reftests/center-center-300x300-picture-in-200x100.css b/testsuite/reftests/center-center-300x300-picture-in-200x100.css new file mode 100644 index 0000000000..5b067dd562 --- /dev/null +++ b/testsuite/reftests/center-center-300x300-picture-in-200x100.css @@ -0,0 +1,15 @@ +* { + all: unset; + background-color: mintcream; +} + +picture { + background-color: firebrick; +} + +#reference { + background-image: image(lime); + background-repeat: no-repeat; + background-position: center; + background-size: 300px 300px; +} diff --git a/testsuite/reftests/center-center-300x300-picture-in-200x100.ref.ui b/testsuite/reftests/center-center-300x300-picture-in-200x100.ref.ui new file mode 100644 index 0000000000..e06f2b02dd --- /dev/null +++ b/testsuite/reftests/center-center-300x300-picture-in-200x100.ref.ui @@ -0,0 +1,9 @@ + + + + 200 + 100 + reference + 0 + + diff --git a/testsuite/reftests/center-center-300x300-picture-in-200x100.ui b/testsuite/reftests/center-center-300x300-picture-in-200x100.ui new file mode 100644 index 0000000000..5c2e1735e6 --- /dev/null +++ b/testsuite/reftests/center-center-300x300-picture-in-200x100.ui @@ -0,0 +1,24 @@ + + + + 200 + 100 + 0 + + + + + green-300x300.png + 0 + 1 + center + center + + 0 + + + + + + + diff --git a/testsuite/reftests/green-100x100.png b/testsuite/reftests/green-100x100.png new file mode 100644 index 0000000000000000000000000000000000000000..b23bbba154ea88b086856dc37b2b6413d70919b2 GIT binary patch literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^DImbp}sYKbLh*2~7Y5226bb literal 0 HcmV?d00001 diff --git a/testsuite/reftests/green-200x200.png b/testsuite/reftests/green-200x200.png new file mode 100644 index 0000000000000000000000000000000000000000..34baf2abe6084ed0a5a0c0d1e6a905998c2cdfdf GIT binary patch literal 427 zcmeAS@N?(olHy`uVBq!ia0vp^CqS5k2}mkgS)OEIU@Y=S=d|q;iT0*4eq*(GX#7%1`?~W_;3s?7G_do8BpBB$tXN<_+X1r1LwgOYT^TD ZnYQUNho^j0djm{}44$rjF6*2UngGFah{gZ_ literal 0 HcmV?d00001 diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build index 4a84e1de72..8e1b8bd501 100644 --- a/testsuite/reftests/meson.build +++ b/testsuite/reftests/meson.build @@ -170,6 +170,36 @@ testdata = [ 'box-shadow-with-blend-mode.ui', 'button-wrapping.ui', 'button-wrapping.ref.ui', + 'center-center-100x100-picture-in-100x200.css', + 'center-center-100x100-picture-in-100x200.ref.ui', + 'center-center-100x100-picture-in-100x200.ui', + 'center-center-100x100-picture-in-200x100.css', + 'center-center-100x100-picture-in-200x100.ref.ui', + 'center-center-100x100-picture-in-200x100.ui', + 'center-center-150x150-picture-in-100x200.css', + 'center-center-150x150-picture-in-100x200.ref.ui', + 'center-center-150x150-picture-in-100x200.ui', + 'center-center-150x150-picture-in-200x100.css', + 'center-center-150x150-picture-in-200x100.ref.ui', + 'center-center-150x150-picture-in-200x100.ui', + 'center-center-200x200-picture-in-100x200.css', + 'center-center-200x200-picture-in-100x200.ref.ui', + 'center-center-200x200-picture-in-100x200.ui', + 'center-center-200x200-picture-in-200x100.css', + 'center-center-200x200-picture-in-200x100.ref.ui', + 'center-center-200x200-picture-in-200x100.ui', + 'center-center-20x20-picture-in-100x200.css', + 'center-center-20x20-picture-in-100x200.ref.ui', + 'center-center-20x20-picture-in-100x200.ui', + 'center-center-20x20-picture-in-200x100.css', + 'center-center-20x20-picture-in-200x100.ref.ui', + 'center-center-20x20-picture-in-200x100.ui', + 'center-center-300x300-picture-in-100x200.css', + 'center-center-300x300-picture-in-100x200.ref.ui', + 'center-center-300x300-picture-in-100x200.ui', + 'center-center-300x300-picture-in-200x100.css', + 'center-center-300x300-picture-in-200x100.ref.ui', + 'center-center-300x300-picture-in-200x100.ui', 'centerlayout-invisible-child.css', 'centerlayout-invisible-child.ref.ui', 'centerlayout-invisible-child.ui',