[gtk+] reftests: Add test for missing-image handling



commit 05bdecb2f82381dbfdba6dcacf09fd20a0c76964
Author: Benjamin Otte <otte redhat com>
Date:   Fri Dec 4 17:43:36 2015 +0100

    reftests: Add test for missing-image handling
    
    Add a test that ensures that missing images get the icon-effect properly
    applied.

 testsuite/reftests/Makefile.am                |    3 +
 testsuite/reftests/icon-effect-missing.css    |   11 +++++
 testsuite/reftests/icon-effect-missing.ref.ui |   51 +++++++++++++++++++++++++
 testsuite/reftests/icon-effect-missing.ui     |   51 +++++++++++++++++++++++++
 4 files changed, 116 insertions(+), 0 deletions(-)
---
diff --git a/testsuite/reftests/Makefile.am b/testsuite/reftests/Makefile.am
index 66e3c50..fd49b5f 100644
--- a/testsuite/reftests/Makefile.am
+++ b/testsuite/reftests/Makefile.am
@@ -259,6 +259,9 @@ testdata = \
        gtk-icontheme-sizing.css \
        gtk-icontheme-sizing.ref.ui \
        gtk-icontheme-sizing.ui \
+       icon-effect-missing.css \
+       icon-effect-missing.ref.ui \
+       icon-effect-missing.ui \
        icon-shadow-no-transform.css \
        icon-shadow-no-transform.ref.ui \
        icon-shadow-no-transform.ui \
diff --git a/testsuite/reftests/icon-effect-missing.css b/testsuite/reftests/icon-effect-missing.css
new file mode 100644
index 0000000..a3faf81
--- /dev/null
+++ b/testsuite/reftests/icon-effect-missing.css
@@ -0,0 +1,11 @@
+* {
+  -gtk-icon-effect: none;
+}
+
+:nth-child(2) {
+  -gtk-icon-effect: dim;
+}
+
+:nth-child(3) {
+  -gtk-icon-effect: highlight;
+}
diff --git a/testsuite/reftests/icon-effect-missing.ref.ui b/testsuite/reftests/icon-effect-missing.ref.ui
new file mode 100644
index 0000000..f58abe2
--- /dev/null
+++ b/testsuite/reftests/icon-effect-missing.ref.ui
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.19.0 -->
+<interface>
+  <requires lib="gtk+" version="3.16"/>
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkImage" id="image1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="icon_name">image-missing</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkImage" id="image2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="icon_name">image-missing</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkImage" id="image3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="icon_name">image-missing</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/testsuite/reftests/icon-effect-missing.ui b/testsuite/reftests/icon-effect-missing.ui
new file mode 100644
index 0000000..b7a4bac
--- /dev/null
+++ b/testsuite/reftests/icon-effect-missing.ui
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.19.0 -->
+<interface>
+  <requires lib="gtk+" version="3.16"/>
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkImage" id="image1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="icon_name">deine-mudda-gibs-hier-nich</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkImage" id="image2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="icon_name">deine-mudda-gibs-hier-nich</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkImage" id="image3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="icon_name">deine-mudda-gibs-hier-nich</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]