[gtk+/wip/css: 12/163] reftests: Add test for pseudo-class matching



commit 5eefa208cae2f45de02ff7e9e60c5ad12408c457
Author: Benjamin Otte <otte redhat com>
Date:   Wed Dec 28 23:16:51 2011 +0100

    reftests: Add test for pseudo-class matching
    
    Previous GTK matched pseudoclasses not based on CSS rules, but based on
    their value in the enumeration. This is now fixed.

 tests/reftests/Makefile.am            |    3 +++
 tests/reftests/css-multi-state.css    |    9 +++++++++
 tests/reftests/css-multi-state.ref.ui |   27 +++++++++++++++++++++++++++
 tests/reftests/css-multi-state.ui     |   26 ++++++++++++++++++++++++++
 4 files changed, 65 insertions(+), 0 deletions(-)
---
diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am
index 9f5efc6..1175e24 100644
--- a/tests/reftests/Makefile.am
+++ b/tests/reftests/Makefile.am
@@ -103,6 +103,9 @@ EXTRA_DIST += \
 	css-match-type.css \
 	css-match-type.ref.ui \
 	css-match-type.ui \
+	css-multi-state.css \
+	css-multi-state.ref.ui \
+	css-multi-state.ui \
 	entry-progress-coloring.css \
 	entry-progress-coloring.ref.ui \
 	entry-progress-coloring.ui \
diff --git a/tests/reftests/css-multi-state.css b/tests/reftests/css-multi-state.css
new file mode 100644
index 0000000..b3b96fc
--- /dev/null
+++ b/tests/reftests/css-multi-state.css
@@ -0,0 +1,9 @@
+GtkLabel:active,
+#reference:insensitive {
+  color: green;
+}
+
+GtkLabel:insensitive,
+#reference:active {
+  color: blue;
+}
diff --git a/tests/reftests/css-multi-state.ref.ui b/tests/reftests/css-multi-state.ref.ui
new file mode 100644
index 0000000..f7f31a4
--- /dev/null
+++ b/tests/reftests/css-multi-state.ref.ui
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkToggleButton" id="togglebutton1">
+        <property name="use_action_appearance">False</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="active">True</property>
+        <child>
+          <object class="GtkLabel" id="label1">
+            <property name="name">reference</property>
+            <property name="visible">True</property>
+            <property name="sensitive">False</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">insensitive</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/tests/reftests/css-multi-state.ui b/tests/reftests/css-multi-state.ui
new file mode 100644
index 0000000..b97d395
--- /dev/null
+++ b/tests/reftests/css-multi-state.ui
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkToggleButton" id="togglebutton1">
+        <property name="use_action_appearance">False</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="active">True</property>
+        <child>
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="sensitive">False</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">insensitive</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>



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