[gtk+/parser] reftests: Add a test for matching by name



commit 2d5b83a38a094f1eae4657e0316f5effe17a1b18
Author: Benjamin Otte <otte redhat com>
Date:   Sun May 15 00:34:43 2011 +0200

    reftests: Add a test for matching by name

 tests/reftests/Makefile.am           |    3 +++
 tests/reftests/css-match-name.css    |   15 +++++++++++++++
 tests/reftests/css-match-name.ref.ui |   15 +++++++++++++++
 tests/reftests/css-match-name.ui     |   14 ++++++++++++++
 4 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am
index 41a4c75..cdf1207 100644
--- a/tests/reftests/Makefile.am
+++ b/tests/reftests/Makefile.am
@@ -28,6 +28,9 @@ EXTRA_DIST += \
 	box-packing.css \
 	box-packing.ref.ui \
 	box-packing.ui \
+	css-match-name.css \
+	css-match-name.ref.ui \
+	css-match-name.ui \
 	css-match-subtype.css \
 	css-match-subtype.ref.ui \
 	css-match-subtype.ui \
diff --git a/tests/reftests/css-match-name.css b/tests/reftests/css-match-name.css
new file mode 100644
index 0000000..98607a0
--- /dev/null
+++ b/tests/reftests/css-match-name.css
@@ -0,0 +1,15 @@
+#window {
+  engine: none;
+  background-image: none;
+  background-color: green;
+  border-radius: 0;
+  border-style: none;
+}
+
+#nowindow {
+  background-color: red;
+}
+
+#window#nowindow {
+  background-color: blue;
+}
diff --git a/tests/reftests/css-match-name.ref.ui b/tests/reftests/css-match-name.ref.ui
new file mode 100644
index 0000000..d8d31c3
--- /dev/null
+++ b/tests/reftests/css-match-name.ref.ui
@@ -0,0 +1,15 @@
+<?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="GtkImage" id="image1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="pixbuf">green-20x20.png</property>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/tests/reftests/css-match-name.ui b/tests/reftests/css-match-name.ui
new file mode 100644
index 0000000..ee6db3a
--- /dev/null
+++ b/tests/reftests/css-match-name.ui
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="width_request">20</property>
+    <property name="height_request">20</property>
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <property name="name">window</property>
+    <style>
+      <class name="window" />
+    </style>
+  </object>
+</interface>



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