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



commit 722909b58f05039e85d458b8f9c02f3429e49592
Author: Benjamin Otte <otte redhat com>
Date:   Sun May 15 01:28:17 2011 +0200

    reftests: Add a test for matching by class

 tests/reftests/Makefile.am            |    3 +++
 tests/reftests/css-match-class.css    |   15 +++++++++++++++
 tests/reftests/css-match-class.ref.ui |   15 +++++++++++++++
 tests/reftests/css-match-class.ui     |   14 ++++++++++++++
 4 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am
index cdf1207..ad8a2b7 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-class.css \
+	css-match-class.ref.ui \
+	css-match-class.ui \
 	css-match-name.css \
 	css-match-name.ref.ui \
 	css-match-name.ui \
diff --git a/tests/reftests/css-match-class.css b/tests/reftests/css-match-class.css
new file mode 100644
index 0000000..bff8647
--- /dev/null
+++ b/tests/reftests/css-match-class.css
@@ -0,0 +1,15 @@
+.window {
+  engine: none;
+  background-image: none;
+  background-color: green;
+  border-radius: 0;
+  border-style: none;
+}
+
+.notwindow {
+  background-color: red;
+}
+
+.window.notwindow {
+  background-color: blue;
+}
diff --git a/tests/reftests/css-match-class.ref.ui b/tests/reftests/css-match-class.ref.ui
new file mode 100644
index 0000000..d8d31c3
--- /dev/null
+++ b/tests/reftests/css-match-class.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-class.ui b/tests/reftests/css-match-class.ui
new file mode 100644
index 0000000..ee6db3a
--- /dev/null
+++ b/tests/reftests/css-match-class.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]