[gtk+] reftests: Add a test ensuring selectors don't match children
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] reftests: Add a test ensuring selectors don't match children
- Date: Wed, 18 May 2011 20:31:40 +0000 (UTC)
commit 1400644069d275c37d2922c2e20041f6fcb5f8eb
Author: Benjamin Otte <otte redhat com>
Date: Sun May 15 13:27:19 2011 +0200
reftests: Add a test ensuring selectors don't match children
Previously, the selector "Foo" would not only match Foo widgets, but
also all widgets that are descendants of Foo.
tests/reftests/Makefile.am | 3 +++
tests/reftests/css-match-exact.css | 3 +++
tests/reftests/css-match-exact.ref.ui | 13 +++++++++++++
tests/reftests/css-match-exact.ui | 30 ++++++++++++++++++++++++++++++
4 files changed, 49 insertions(+), 0 deletions(-)
---
diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am
index 2168885..44d400e 100644
--- a/tests/reftests/Makefile.am
+++ b/tests/reftests/Makefile.am
@@ -35,6 +35,9 @@ EXTRA_DIST += \
css-match-descendant-later.css \
css-match-descendant-later.ref.ui \
css-match-descendant-later.ui \
+ css-match-exact.css \
+ css-match-exact.ref.ui \
+ css-match-exact.ui \
css-match-name.css \
css-match-name.ref.ui \
css-match-name.ui \
diff --git a/tests/reftests/css-match-exact.css b/tests/reftests/css-match-exact.css
new file mode 100644
index 0000000..c84ffe9
--- /dev/null
+++ b/tests/reftests/css-match-exact.css
@@ -0,0 +1,3 @@
+GtkGrid {
+ background-color: purple;
+}
diff --git a/tests/reftests/css-match-exact.ref.ui b/tests/reftests/css-match-exact.ref.ui
new file mode 100644
index 0000000..2f24fa1
--- /dev/null
+++ b/tests/reftests/css-match-exact.ref.ui
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkWindow" id="window1">
+ <property name="width_request">10</property>
+ <property name="height_request">10</property>
+ <property name="can_focus">False</property>
+ <property name="type">popup</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+</interface>
diff --git a/tests/reftests/css-match-exact.ui b/tests/reftests/css-match-exact.ui
new file mode 100644
index 0000000..1c39ba7
--- /dev/null
+++ b/tests/reftests/css-match-exact.ui
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkWindow" id="window1">
+ <property name="width_request">10</property>
+ <property name="height_request">10</property>
+ <property name="can_focus">False</property>
+ <property name="type">popup</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkEventBox" id="eventbox1">
+ <property name="width_request">10</property>
+ <property name="height_request">10</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]