[gtk+/wip/css: 37/37] reftests: Add transparent linear-gradient() test



commit 984ab668558ee004e2e4e890fd0ee5bdd3421a82
Author: Benjamin Otte <otte redhat com>
Date:   Mon Jan 23 12:01:33 2012 +0100

    reftests: Add transparent linear-gradient() test
    
    A transition from red to transparent with a green background-color is
    equivalent to a transition from red to green if it's done using a
    premultiplied gradient transition.

 tests/reftests/linear-gradient.css    |    9 +++++++++
 tests/reftests/linear-gradient.ref.ui |   17 +++++++++++++++++
 tests/reftests/linear-gradient.ui     |   17 +++++++++++++++++
 3 files changed, 43 insertions(+), 0 deletions(-)
---
diff --git a/tests/reftests/linear-gradient.css b/tests/reftests/linear-gradient.css
index 74b03b8..094c3da 100644
--- a/tests/reftests/linear-gradient.css
+++ b/tests/reftests/linear-gradient.css
@@ -33,3 +33,12 @@
 #reference #c {
   background-image: linear-gradient(to top, red, green 10px, red 20px, green 30px, red 40px);
 }
+
+#d {
+  background-image: linear-gradient(red, rgba(0,1,0,0.5), transparent);
+  background-color: green;
+}
+
+#reference #d {
+  background-image: linear-gradient(red, rgb(0, 1, 0.5), green);
+}
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]