]> Pileus Git - ~andy/gtk/commitdiff
reftests: fix the linear-gradient reftest
authorCosimo Cecchi <cosimoc@gnome.org>
Tue, 16 Oct 2012 17:02:55 +0000 (13:02 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 16 Oct 2012 17:12:00 +0000 (13:12 -0400)
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
tests/reftests/linear-gradient.css
tests/reftests/linear-gradient.ref.ui
tests/reftests/linear-gradient.ui

index 15ba7ebe0faf4cecd915714173f00aff1a169a75..b0e7dfbf9efb43459234366c6b3068f294835c93 100644 (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 \
index d6ed0d0d1be00515c79b1bc9a88b7e648697b76d..5ec7fb94ffa93fb8a62a2b10454bbee866aeb72c 100644 (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.
 }
 
 #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);
+}
index e7f5a6084ce9f8f13f8c63d6a89798bf3e028ada..ec77ed2b687599a969a242a3304aa2f6e520764b 100644 (file)
             <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>
index adbfbe22e81918400dfde37c51b22c689877f10b..7da0ad8c4cac054f29aa02b6dcb8ba5489743d4d 100644 (file)
             <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>