diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-10-16 13:02:55 -0400 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-10-16 13:12:00 -0400 |
commit | 6b3416a2d748d8cdede075bea259fe609aeadc5b (patch) | |
tree | d92d7839592d86d31e30f42ed5b03e4657213007 | |
parent | 17760bd2ebd87570e04efee856c7e232f8154bfa (diff) | |
download | gtk+-6b3416a2d748d8cdede075bea259fe609aeadc5b.tar.gz |
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.
-rw-r--r-- | tests/reftests/Makefile.am | 3 | ||||
-rw-r--r-- | tests/reftests/linear-gradient.css | 11 | ||||
-rw-r--r-- | tests/reftests/linear-gradient.ref.ui | 17 | ||||
-rw-r--r-- | 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 15ba7ebe0f..b0e7dfbf9e 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 d6ed0d0d1b..5ec7fb94ff 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 e7f5a6084c..ec77ed2b68 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 adbfbe22e8..7da0ad8c4c 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> |