summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-08-05 08:09:42 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-08-05 08:10:35 -0400
commit21a1413bf358f6529fee98f8904b66ada3347233 (patch)
treef98c796f1f5defeb9080300d16ee2fd8611d2896 /testsuite
parent8870ec5e7b82ead673876c8021fa62ce56db6216 (diff)
downloadgtk+-21a1413bf358f6529fee98f8904b66ada3347233.tar.gz
Add a reftest for gradients with hard stops
This is testing the issue described in #1293. No fix though, this is still broken in Vulkan. It works correctly in GL and with cairo.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/reftests/gradient-hard-stop.css17
-rw-r--r--testsuite/reftests/gradient-hard-stop.ref.ui27
-rw-r--r--testsuite/reftests/gradient-hard-stop.ui9
-rw-r--r--testsuite/reftests/meson.build3
4 files changed, 56 insertions, 0 deletions
diff --git a/testsuite/reftests/gradient-hard-stop.css b/testsuite/reftests/gradient-hard-stop.css
new file mode 100644
index 0000000000..a93406fbfb
--- /dev/null
+++ b/testsuite/reftests/gradient-hard-stop.css
@@ -0,0 +1,17 @@
+@import "reset-to-defaults.css";
+
+window {
+ background-color: black;
+}
+
+#reference {
+ background: linear-gradient(red 50%, yellow 50%);
+}
+
+#red {
+ background-color: red;
+}
+
+#yellow {
+ background-color: yellow;
+}
diff --git a/testsuite/reftests/gradient-hard-stop.ref.ui b/testsuite/reftests/gradient-hard-stop.ref.ui
new file mode 100644
index 0000000000..7e9248400f
--- /dev/null
+++ b/testsuite/reftests/gradient-hard-stop.ref.ui
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow" id="window1">
+ <property name="decorated">0</property>
+ <property name="default_width">200</property>
+ <property name="default_height">200</property>
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkBox">
+ <property name="hexpand">1</property>
+ <property name="vexpand">1</property>
+ <property name="name">red</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="hexpand">1</property>
+ <property name="vexpand">1</property>
+ <property name="name">yellow</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/testsuite/reftests/gradient-hard-stop.ui b/testsuite/reftests/gradient-hard-stop.ui
new file mode 100644
index 0000000000..d7ae2bcfa1
--- /dev/null
+++ b/testsuite/reftests/gradient-hard-stop.ui
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow" id="window1">
+ <property name="decorated">0</property>
+ <property name="default_width">200</property>
+ <property name="default_height">200</property>
+ <property name="name">reference</property>
+ </object>
+</interface>
diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build
index 005f0d9ca9..816e370992 100644
--- a/testsuite/reftests/meson.build
+++ b/testsuite/reftests/meson.build
@@ -223,6 +223,9 @@ testdata = [
'gtk-image-effect-inherit.css',
'gtk-image-effect-inherit.ref.ui',
'gtk-image-effect-inherit.ui',
+ 'gradient-hard-stop.css',
+ 'gradient-hard-stop.ref.ui',
+ 'gradient-hard-stop.ui',
'green-20x20.png',
'grid-empty-with-spacing.ref.ui',
'grid-empty-with-spacing.ui',