[gtk+] reftests: Add a reftest for recent widget path fix



commit d66db441e35d0d2d97d47dad152301530ad85f22
Author: Benjamin Otte <otte redhat com>
Date:   Tue Jul 22 03:04:01 2014 +0200

    reftests: Add a reftest for recent widget path fix
    
    The widget path code copies elements only in gtk_widget_path_copy() -
    which is essentially unused - and in
    gtk_widget_path_append_with_siblings() - which is used by GtkBox.
    
    So stuff the widget we are testing in a GtkBox to reroduce the problem.

 testsuite/reftests/Makefile.am               |    3 ++
 testsuite/reftests/pseudoclass-on-box.css    |    7 ++++
 testsuite/reftests/pseudoclass-on-box.ref.ui |   39 ++++++++++++++++++++++++++
 testsuite/reftests/pseudoclass-on-box.ui     |   36 ++++++++++++++++++++++++
 4 files changed, 85 insertions(+), 0 deletions(-)
---
diff --git a/testsuite/reftests/Makefile.am b/testsuite/reftests/Makefile.am
index fde67cc..fef1075 100644
--- a/testsuite/reftests/Makefile.am
+++ b/testsuite/reftests/Makefile.am
@@ -305,6 +305,9 @@ testdata = \
        paned-undersized.css \
        paned-undersized.ref.ui \
        paned-undersized.ui \
+       pseudoclass-on-box.css \
+       pseudoclass-on-box.ref.ui \
+       pseudoclass-on-box.ui \
        pseudoclass-on-parent.css \
        pseudoclass-on-parent.ref.ui \
        pseudoclass-on-parent.ui \
diff --git a/testsuite/reftests/pseudoclass-on-box.css b/testsuite/reftests/pseudoclass-on-box.css
new file mode 100644
index 0000000..cc1f11d
--- /dev/null
+++ b/testsuite/reftests/pseudoclass-on-box.css
@@ -0,0 +1,7 @@
+:active {
+  color: blue;
+}
+
+:active * {
+  color: red;
+}
diff --git a/testsuite/reftests/pseudoclass-on-box.ref.ui b/testsuite/reftests/pseudoclass-on-box.ref.ui
new file mode 100644
index 0000000..393c9f1
--- /dev/null
+++ b/testsuite/reftests/pseudoclass-on-box.ref.ui
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.1 -->
+<interface>
+  <requires lib="gtk+" version="3.12"/>
+  <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>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkToggleButton" id="togglebutton1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="active">True</property>
+            <child>
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">I should be red.</property>
+                <attributes>
+                  <attribute name="foreground" value="#ffff00000000"/>
+                </attributes>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/testsuite/reftests/pseudoclass-on-box.ui b/testsuite/reftests/pseudoclass-on-box.ui
new file mode 100644
index 0000000..05016b9
--- /dev/null
+++ b/testsuite/reftests/pseudoclass-on-box.ui
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.1 -->
+<interface>
+  <requires lib="gtk+" version="3.12"/>
+  <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>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkToggleButton" id="togglebutton1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="active">True</property>
+            <child>
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">I should be red.</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>


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