[gtk+] reftests: add a reftest for the CSS :only-child selector
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] reftests: add a reftest for the CSS :only-child selector
- Date: Tue, 4 Oct 2011 15:48:46 +0000 (UTC)
commit b928664471e13505cfcd923a80266e933d0ad91b
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Oct 4 11:46:25 2011 -0400
reftests: add a reftest for the CSS :only-child selector
https://bugzilla.gnome.org/show_bug.cgi?id=660833
tests/reftests/Makefile.am | 3 ++
tests/reftests/style-properties-only-child.css | 9 ++++++
tests/reftests/style-properties-only-child.ref.ui | 32 +++++++++++++++++++++
tests/reftests/style-properties-only-child.ui | 32 +++++++++++++++++++++
4 files changed, 76 insertions(+), 0 deletions(-)
---
diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am
index 767a469..844643a 100644
--- a/tests/reftests/Makefile.am
+++ b/tests/reftests/Makefile.am
@@ -152,6 +152,9 @@ EXTRA_DIST += \
style-properties-nth-child.css \
style-properties-nth-child.ref.ui \
style-properties-nth-child.ui \
+ style-properties-only-child.css \
+ style-properties-only-child.ref.ui \
+ style-properties-only-child.ui \
toplevel-vs-popup.ref.ui \
toplevel-vs-popup.ui \
unresolvable.css \
diff --git a/tests/reftests/style-properties-only-child.css b/tests/reftests/style-properties-only-child.css
new file mode 100644
index 0000000..e652ef7
--- /dev/null
+++ b/tests/reftests/style-properties-only-child.css
@@ -0,0 +1,9 @@
+.only-child-ref:nth-child(first):nth-child(last) {
+ color: blue;
+ background-color: red;
+}
+
+.only-child-notref:only-child {
+ color: blue;
+ background-color: red;
+}
diff --git a/tests/reftests/style-properties-only-child.ref.ui b/tests/reftests/style-properties-only-child.ref.ui
new file mode 100644
index 0000000..ff05332
--- /dev/null
+++ b/tests/reftests/style-properties-only-child.ref.ui
@@ -0,0 +1,32 @@
+<?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>
+ <property name="width_request">300</property>
+ <property name="height_request">300</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="GtkButton" id="button1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">Foo</property>
+ <style>
+ <class name="only-child-ref"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/tests/reftests/style-properties-only-child.ui b/tests/reftests/style-properties-only-child.ui
new file mode 100644
index 0000000..0f769cf
--- /dev/null
+++ b/tests/reftests/style-properties-only-child.ui
@@ -0,0 +1,32 @@
+<?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>
+ <property name="width_request">300</property>
+ <property name="height_request">300</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="GtkButton" id="button1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">Foo</property>
+ <style>
+ <class name="only-child-notref"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]