[gtk+/wip/matthiasc/node-dump: 10/12] Add a css style test for :first/last/only-child



commit 79f383ab195fbc0a9f5fbf1cb8e939819e04462a
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Dec 28 13:59:10 2015 -0500

    Add a css style test for :first/last/only-child

 testsuite/css/style/Makefile.am     |    1 +
 testsuite/css/style/nth-child.css   |   14 ++++++++++
 testsuite/css/style/nth-child.nodes |   13 +++++++++
 testsuite/css/style/nth-child.ui    |   48 +++++++++++++++++++++++++++++++++++
 4 files changed, 76 insertions(+), 0 deletions(-)
---
diff --git a/testsuite/css/style/Makefile.am b/testsuite/css/style/Makefile.am
index db48f79..a7d1e99 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 0000000..96265b2
--- /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 0000000..55c70d8
--- /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 0000000..b0b6765
--- /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>


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