[gtk+] reftests: fix the linear-gradient reftest
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] reftests: fix the linear-gradient reftest
- Date: Tue, 16 Oct 2012 17:23:08 +0000 (UTC)
commit 6b3416a2d748d8cdede075bea259fe609aeadc5b
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Oct 16 13:02:55 2012 -0400
reftests: fix the linear-gradient reftest
Don't use a repeating linear gradient, since it can't be easily
reftested against a non-repeating one for the reasons described in the
test header.
Instead, add a separate test for repeating gradients (against another
repeating gradient).
This makes the test pass, so it can be added to the Makefile now.
tests/reftests/Makefile.am | 3 +++
tests/reftests/linear-gradient.css | 11 ++++++++++-
tests/reftests/linear-gradient.ref.ui | 17 +++++++++++++++++
tests/reftests/linear-gradient.ui | 17 +++++++++++++++++
4 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am
index 15ba7eb..b0e7dfb 100644
--- a/tests/reftests/Makefile.am
+++ b/tests/reftests/Makefile.am
@@ -186,6 +186,9 @@ EXTRA_DIST += \
label-small-ellipsized.ui \
label-wrap-justify.ref.ui \
label-wrap-justify.ui \
+ linear-gradient.css \
+ linear-gradient.ref.ui \
+ linear-gradient.ui \
messagedialog-secondarytext.ui \
messagedialog-secondarytext.ref.ui \
misc-alignment.css \
diff --git a/tests/reftests/linear-gradient.css b/tests/reftests/linear-gradient.css
index d6ed0d0..5ec7fb9 100644
--- a/tests/reftests/linear-gradient.css
+++ b/tests/reftests/linear-gradient.css
@@ -6,6 +6,7 @@
* This means that you cannot:
* ... add extra color stops, even if they'd be invisible
* ... mirror the gradient (ie 'to left, red, green' vs 'to right, green, red')
+ * ... test a repeating gradient against a non repeating one
* and probably a bunch of other things.
* These things can cause off-by-one rounding errors in pixman (and probably
* your GPU, too) and that'd trigger test failures.
@@ -27,9 +28,17 @@
}
#c {
- background-image: repeating-linear-gradient(3.5turn, red, green 10px, red 20px);
+ background-image: linear-gradient(3.5turn, red, green 10px, red 20px, green 30px, red 40px);
}
#reference #c {
background-image: linear-gradient(to bottom, red, green 10px, red 20px, green 30px, red 40px);
}
+
+#d {
+ background-image: repeating-linear-gradient(180deg, red, green 10px, red 20px);
+}
+
+#reference #d {
+ background-image: repeating-linear-gradient(to bottom, red, green 10px, red 20px);
+}
diff --git a/tests/reftests/linear-gradient.ref.ui b/tests/reftests/linear-gradient.ref.ui
index e7f5a60..ec77ed2 100644
--- a/tests/reftests/linear-gradient.ref.ui
+++ b/tests/reftests/linear-gradient.ref.ui
@@ -61,6 +61,23 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkButton" id="button4">
+ <property name="use_action_appearance">False</property>
+ <property name="width_request">40</property>
+ <property name="height_request">30</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="name">d</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
</child>
</object>
diff --git a/tests/reftests/linear-gradient.ui b/tests/reftests/linear-gradient.ui
index adbfbe2..7da0ad8 100644
--- a/tests/reftests/linear-gradient.ui
+++ b/tests/reftests/linear-gradient.ui
@@ -60,6 +60,23 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkButton" id="button4">
+ <property name="use_action_appearance">False</property>
+ <property name="width_request">40</property>
+ <property name="height_request">30</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="name">d</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]