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.
This commit is contained in:
Cosimo Cecchi 2012-10-16 13:02:55 -04:00
parent 17760bd2eb
commit 6b3416a2d7
4 changed files with 47 additions and 1 deletions

View File

@ -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 \

View File

@ -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);
}

View File

@ -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>

View File

@ -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>