[gtk/wip/otte/center-center-center: 1/2] testsuite: Add lots of reftests for picture sizing




commit 909845cafc6dfc4f8544d1cabde0ef55a2d58960
Author: Benjamin Otte <otte redhat com>
Date:   Thu Oct 21 03:32:32 2021 +0200

    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.

 .../center-center-100x100-picture-in-100x200.css   |  15 +++++++++++
 ...center-center-100x100-picture-in-100x200.ref.ui |   9 +++++++
 .../center-center-100x100-picture-in-100x200.ui    |  24 +++++++++++++++++
 .../center-center-100x100-picture-in-200x100.css   |  15 +++++++++++
 ...center-center-100x100-picture-in-200x100.ref.ui |   9 +++++++
 .../center-center-100x100-picture-in-200x100.ui    |  24 +++++++++++++++++
 .../center-center-150x150-picture-in-100x200.css   |  15 +++++++++++
 ...center-center-150x150-picture-in-100x200.ref.ui |   9 +++++++
 .../center-center-150x150-picture-in-100x200.ui    |  24 +++++++++++++++++
 .../center-center-150x150-picture-in-200x100.css   |  15 +++++++++++
 ...center-center-150x150-picture-in-200x100.ref.ui |   9 +++++++
 .../center-center-150x150-picture-in-200x100.ui    |  24 +++++++++++++++++
 .../center-center-200x200-picture-in-100x200.css   |  15 +++++++++++
 ...center-center-200x200-picture-in-100x200.ref.ui |   9 +++++++
 .../center-center-200x200-picture-in-100x200.ui    |  24 +++++++++++++++++
 .../center-center-200x200-picture-in-200x100.css   |  15 +++++++++++
 ...center-center-200x200-picture-in-200x100.ref.ui |   9 +++++++
 .../center-center-200x200-picture-in-200x100.ui    |  24 +++++++++++++++++
 .../center-center-20x20-picture-in-100x200.css     |  15 +++++++++++
 .../center-center-20x20-picture-in-100x200.ref.ui  |   9 +++++++
 .../center-center-20x20-picture-in-100x200.ui      |  24 +++++++++++++++++
 .../center-center-20x20-picture-in-200x100.css     |  15 +++++++++++
 .../center-center-20x20-picture-in-200x100.ref.ui  |   9 +++++++
 .../center-center-20x20-picture-in-200x100.ui      |  24 +++++++++++++++++
 .../center-center-300x300-picture-in-100x200.css   |  15 +++++++++++
 ...center-center-300x300-picture-in-100x200.ref.ui |   9 +++++++
 .../center-center-300x300-picture-in-100x200.ui    |  24 +++++++++++++++++
 .../center-center-300x300-picture-in-200x100.css   |  15 +++++++++++
 ...center-center-300x300-picture-in-200x100.ref.ui |   9 +++++++
 .../center-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(+)
---
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">100</property>
+    <property name="height_request">200</property>
+    <property name="name">reference</property>
+    <property name="decorated">0</property>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">100</property>
+    <property name="height_request">200</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkOverlay">
+        <child type="overlay">
+          <object class="GtkPicture">
+            <property name="paintable">green-100x100.png</property>
+            <property name="keep-aspect-ratio">0</property>
+            <property name="can-shrink">1</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <layout>
+              <property name="measure">0</property>
+            </layout>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">200</property>
+    <property name="height_request">100</property>
+    <property name="name">reference</property>
+    <property name="decorated">0</property>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">200</property>
+    <property name="height_request">100</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkOverlay">
+        <child type="overlay">
+          <object class="GtkPicture">
+            <property name="paintable">green-100x100.png</property>
+            <property name="keep-aspect-ratio">0</property>
+            <property name="can-shrink">1</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <layout>
+              <property name="measure">0</property>
+            </layout>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">100</property>
+    <property name="height_request">200</property>
+    <property name="name">reference</property>
+    <property name="decorated">0</property>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">100</property>
+    <property name="height_request">200</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkOverlay">
+        <child type="overlay">
+          <object class="GtkPicture">
+            <property name="paintable">green-150x150.png</property>
+            <property name="keep-aspect-ratio">0</property>
+            <property name="can-shrink">1</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <layout>
+              <property name="measure">0</property>
+            </layout>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">200</property>
+    <property name="height_request">100</property>
+    <property name="name">reference</property>
+    <property name="decorated">0</property>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">200</property>
+    <property name="height_request">100</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkOverlay">
+        <child type="overlay">
+          <object class="GtkPicture">
+            <property name="paintable">green-150x150.png</property>
+            <property name="keep-aspect-ratio">0</property>
+            <property name="can-shrink">1</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <layout>
+              <property name="measure">0</property>
+            </layout>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">100</property>
+    <property name="height_request">200</property>
+    <property name="name">reference</property>
+    <property name="decorated">0</property>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">100</property>
+    <property name="height_request">200</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkOverlay">
+        <child type="overlay">
+          <object class="GtkPicture">
+            <property name="paintable">green-200x200.png</property>
+            <property name="keep-aspect-ratio">0</property>
+            <property name="can-shrink">1</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <layout>
+              <property name="measure">0</property>
+            </layout>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">200</property>
+    <property name="height_request">100</property>
+    <property name="name">reference</property>
+    <property name="decorated">0</property>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">200</property>
+    <property name="height_request">100</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkOverlay">
+        <child type="overlay">
+          <object class="GtkPicture">
+            <property name="paintable">green-200x200.png</property>
+            <property name="keep-aspect-ratio">0</property>
+            <property name="can-shrink">1</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <layout>
+              <property name="measure">0</property>
+            </layout>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">100</property>
+    <property name="height_request">200</property>
+    <property name="name">reference</property>
+    <property name="decorated">0</property>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">100</property>
+    <property name="height_request">200</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkOverlay">
+        <child type="overlay">
+          <object class="GtkPicture">
+            <property name="paintable">green-20x20.png</property>
+            <property name="keep-aspect-ratio">0</property>
+            <property name="can-shrink">1</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <layout>
+              <property name="measure">0</property>
+            </layout>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">200</property>
+    <property name="height_request">100</property>
+    <property name="name">reference</property>
+    <property name="decorated">0</property>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">200</property>
+    <property name="height_request">100</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkOverlay">
+        <child type="overlay">
+          <object class="GtkPicture">
+            <property name="paintable">green-20x20.png</property>
+            <property name="keep-aspect-ratio">0</property>
+            <property name="can-shrink">1</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <layout>
+              <property name="measure">0</property>
+            </layout>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">100</property>
+    <property name="height_request">200</property>
+    <property name="name">reference</property>
+    <property name="decorated">0</property>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">100</property>
+    <property name="height_request">200</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkOverlay">
+        <child type="overlay">
+          <object class="GtkPicture">
+            <property name="paintable">green-300x300.png</property>
+            <property name="keep-aspect-ratio">0</property>
+            <property name="can-shrink">1</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <layout>
+              <property name="measure">0</property>
+            </layout>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">200</property>
+    <property name="height_request">100</property>
+    <property name="name">reference</property>
+    <property name="decorated">0</property>
+  </object>
+</interface>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">200</property>
+    <property name="height_request">100</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkOverlay">
+        <child type="overlay">
+          <object class="GtkPicture">
+            <property name="paintable">green-300x300.png</property>
+            <property name="keep-aspect-ratio">0</property>
+            <property name="can-shrink">1</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <layout>
+              <property name="measure">0</property>
+            </layout>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/testsuite/reftests/green-100x100.png b/testsuite/reftests/green-100x100.png
new file mode 100644
index 0000000000..b23bbba154
Binary files /dev/null and b/testsuite/reftests/green-100x100.png differ
diff --git a/testsuite/reftests/green-150x150.png b/testsuite/reftests/green-150x150.png
new file mode 100644
index 0000000000..c2139e0219
Binary files /dev/null and b/testsuite/reftests/green-150x150.png differ
diff --git a/testsuite/reftests/green-200x200.png b/testsuite/reftests/green-200x200.png
new file mode 100644
index 0000000000..34baf2abe6
Binary files /dev/null and b/testsuite/reftests/green-200x200.png differ
diff --git a/testsuite/reftests/green-300x300.png b/testsuite/reftests/green-300x300.png
new file mode 100644
index 0000000000..2151a0b0e7
Binary files /dev/null and b/testsuite/reftests/green-300x300.png differ
diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build
index 93cc87c440..353e6a2ea1 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',
   'center-center-long-label.ui',
   'center-center-long-label.ref.ui',
   'center-center-long-label-max-width-chars.ref.ui',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]