summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-12-28 13:59:10 -0500
committerMatthias Clasen <mclasen@redhat.com>2016-01-03 09:19:31 -0500
commit1ec34ae0854c5f7cf6eac5ed18115d64b5b52e72 (patch)
treecb95a91bef6533d9d8774802b6d6968a4c7b1db4 /testsuite
parent82a571e0ca8e3cd983e475fe31b10b4a776aae3e (diff)
downloadgtk+-1ec34ae0854c5f7cf6eac5ed18115d64b5b52e72.tar.gz
Add a css style test for :first/last/only-child
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/css/style/Makefile.am1
-rw-r--r--testsuite/css/style/nth-child.css14
-rw-r--r--testsuite/css/style/nth-child.nodes13
-rw-r--r--testsuite/css/style/nth-child.ui48
4 files changed, 76 insertions, 0 deletions
diff --git a/testsuite/css/style/Makefile.am b/testsuite/css/style/Makefile.am
index db48f79358..a7d1e99e1b 100644
--- a/testsuite/css/style/Makefile.am
+++ b/testsuite/css/style/Makefile.am
@@ -26,6 +26,7 @@ test_css_style_SOURCES = \
test_data = \
label.ui label.css label.nodes \
+ nth-child.ui nth-child.css nth-child.nodes \
$(NULL)
EXTRA_DIST += $(test_in_files) $(test_data)
diff --git a/testsuite/css/style/nth-child.css b/testsuite/css/style/nth-child.css
new file mode 100644
index 0000000000..96265b2acc
--- /dev/null
+++ b/testsuite/css/style/nth-child.css
@@ -0,0 +1,14 @@
+@import "reset-to-defaults.css";
+
+label:first-child {
+ font-size: 20px;
+}
+label {
+ font-size: 30px;
+}
+label:last-child {
+ font-size: 40px;
+}
+label:only-child {
+ font-size: 50px;
+}
diff --git a/testsuite/css/style/nth-child.nodes b/testsuite/css/style/nth-child.nodes
new file mode 100644
index 0000000000..55c70d8442
--- /dev/null
+++ b/testsuite/css/style/nth-child.nodes
@@ -0,0 +1,13 @@
+window visible=0 state=dir-ltr classes=background
+ decoration visible=1 state=dir-ltr
+ box visible=1 state=dir-ltr classes=horizontal
+ box visible=1 state=dir-ltr classes=horizontal
+ label visible=1 state=dir-ltr
+ font-size: 20px (nth-child.css:4:17)
+ label visible=1 state=dir-ltr
+ font-size: 30px (nth-child.css:7:17)
+ label visible=1 state=dir-ltr
+ font-size: 40px (nth-child.css:10:17)
+ box visible=1 state=dir-ltr classes=horizontal
+ label visible=1 state=dir-ltr
+ font-size: 50px (nth-child.css:13:17)
diff --git a/testsuite/css/style/nth-child.ui b/testsuite/css/style/nth-child.ui
new file mode 100644
index 0000000000..b0b6765860
--- /dev/null
+++ b/testsuite/css/style/nth-child.ui
@@ -0,0 +1,48 @@
+
+<?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">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Hello World!</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Hello World!</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Hello World!</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Hello World!</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>