[gtk+] reftests: Add a rendering test for sibling matching



commit c922967155faa9e895567ead82000ac1fde7fbee
Author: Benjamin Otte <otte redhat com>
Date:   Fri Mar 2 02:16:30 2012 +0100

    reftests: Add a rendering test for sibling matching

 tests/reftests/Makefile.am               |    3 +
 tests/reftests/css-match-siblings.css    |   19 +++++++
 tests/reftests/css-match-siblings.ref.ui |   79 ++++++++++++++++++++++++++++++
 tests/reftests/css-match-siblings.ui     |   75 ++++++++++++++++++++++++++++
 4 files changed, 176 insertions(+), 0 deletions(-)
---
diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am
index ec63260..2974cc0 100644
--- a/tests/reftests/Makefile.am
+++ b/tests/reftests/Makefile.am
@@ -111,6 +111,9 @@ EXTRA_DIST += \
 	css-match-regions.css \
 	css-match-regions.ref.ui \
 	css-match-regions.ui \
+	css-match-siblings.css \
+	css-match-siblings.ref.ui \
+	css-match-siblings.ui \
 	css-match-style-property-order.css \
 	css-match-style-property-order.ref.ui \
 	css-match-style-property-order.ui \
diff --git a/tests/reftests/css-match-siblings.css b/tests/reftests/css-match-siblings.css
new file mode 100644
index 0000000..6529bcb
--- /dev/null
+++ b/tests/reftests/css-match-siblings.css
@@ -0,0 +1,19 @@
+* + *,
+#red {
+  color: red
+}
+
+* ~ * ~ GtkLabel,
+#green {
+  color: green;
+}
+
+* ~ * + GtkLabel ~ *,
+#blue {
+  color: blue;
+}
+
+* + GtkLabel ~ * ~ GtkLabel + *,
+#purple {
+  color: purple;
+}
diff --git a/tests/reftests/css-match-siblings.ref.ui b/tests/reftests/css-match-siblings.ref.ui
new file mode 100644
index 0000000..08a5fff
--- /dev/null
+++ b/tests/reftests/css-match-siblings.ref.ui
@@ -0,0 +1,79 @@
+<?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="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">normal</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Red</property>
+            <property name="name">red</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Green</property>
+            <property name="name">green</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Blue</property>
+            <property name="name">blue</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label5">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Purple</property>
+            <property name="name">purple</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/tests/reftests/css-match-siblings.ui b/tests/reftests/css-match-siblings.ui
new file mode 100644
index 0000000..4c7685d
--- /dev/null
+++ b/tests/reftests/css-match-siblings.ui
@@ -0,0 +1,75 @@
+<?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="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">normal</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Red</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Green</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Blue</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label5">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Purple</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>



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