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



commit ba460d0fcbb9e9b296af68e3be2ba2efce631cb0
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 |  171 +++++++++++++++++++++++++++++++++++
 testsuite/css/style/nth-child.ui    |   48 ++++++++++
 4 files changed, 234 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..82da066
--- /dev/null
+++ b/testsuite/css/style/nth-child.css
@@ -0,0 +1,14 @@
+ import "reset-to-defaults.css";
+
+label:first-child {
+  font-size: 10px;
+}
+label {
+  font-size: 20px;
+}
+label:last-child {
+  font-size: 30px;
+}
+label:only-child {
+  font-size: 40px;
+}
diff --git a/testsuite/css/style/nth-child.nodes b/testsuite/css/style/nth-child.nodes
new file mode 100644
index 0000000..6ff4327
--- /dev/null
+++ b/testsuite/css/style/nth-child.nodes
@@ -0,0 +1,171 @@
+window visible=0 state=dir-ltr classes=background
+  color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+  font-size: 11px (reset-to-defaults.css:2:12)
+  -gtk-icon-theme: initial (reset-to-defaults.css:2:12)
+  background-color: rgba(0,0,0,0) (reset-to-defaults.css:2:12)
+  font-family: "Cantarell" (reset-to-defaults.css:2:12)
+  text-decoration-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+  border-top-width: 0 (reset-to-defaults.css:2:12)
+  border-left-width: 0 (reset-to-defaults.css:2:12)
+  border-bottom-width: 0 (reset-to-defaults.css:2:12)
+  border-right-width: 0 (reset-to-defaults.css:2:12)
+  outline-width: 0 (reset-to-defaults.css:2:12)
+  border-top-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+  border-right-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+  border-bottom-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+  border-left-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+  outline-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+  -gtk-icon-source: builtin (reset-to-defaults.css:2:12)
+  -gtk-icon-palette: success rgb(115,210,22), warning rgb(245,121,0), error rgb(204,0,0) 
(reset-to-defaults.css:2:12)
+  decoration visible=1 state=dir-ltr
+    color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    font-size: 11px (reset-to-defaults.css:2:12)
+    -gtk-icon-theme: initial (reset-to-defaults.css:2:12)
+    background-color: rgba(0,0,0,0) (reset-to-defaults.css:2:12)
+    font-family: "Cantarell" (reset-to-defaults.css:2:12)
+    text-decoration-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    border-top-width: 0 (reset-to-defaults.css:2:12)
+    border-left-width: 0 (reset-to-defaults.css:2:12)
+    border-bottom-width: 0 (reset-to-defaults.css:2:12)
+    border-right-width: 0 (reset-to-defaults.css:2:12)
+    outline-width: 0 (reset-to-defaults.css:2:12)
+    border-top-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    border-right-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    border-bottom-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    border-left-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    outline-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    -gtk-icon-source: builtin (reset-to-defaults.css:2:12)
+    -gtk-icon-palette: success rgb(115,210,22), warning rgb(245,121,0), error rgb(204,0,0) 
(reset-to-defaults.css:2:12)
+  box visible=1 state=dir-ltr classes=horizontal
+    color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    font-size: 11px (reset-to-defaults.css:2:12)
+    -gtk-icon-theme: initial (reset-to-defaults.css:2:12)
+    background-color: rgba(0,0,0,0) (reset-to-defaults.css:2:12)
+    font-family: "Cantarell" (reset-to-defaults.css:2:12)
+    text-decoration-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    border-top-width: 0 (reset-to-defaults.css:2:12)
+    border-left-width: 0 (reset-to-defaults.css:2:12)
+    border-bottom-width: 0 (reset-to-defaults.css:2:12)
+    border-right-width: 0 (reset-to-defaults.css:2:12)
+    outline-width: 0 (reset-to-defaults.css:2:12)
+    border-top-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    border-right-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    border-bottom-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    border-left-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    outline-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+    -gtk-icon-source: builtin (reset-to-defaults.css:2:12)
+    -gtk-icon-palette: success rgb(115,210,22), warning rgb(245,121,0), error rgb(204,0,0) 
(reset-to-defaults.css:2:12)
+    box visible=1 state=dir-ltr classes=horizontal
+      color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      font-size: 11px (reset-to-defaults.css:2:12)
+      -gtk-icon-theme: initial (reset-to-defaults.css:2:12)
+      background-color: rgba(0,0,0,0) (reset-to-defaults.css:2:12)
+      font-family: "Cantarell" (reset-to-defaults.css:2:12)
+      text-decoration-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      border-top-width: 0 (reset-to-defaults.css:2:12)
+      border-left-width: 0 (reset-to-defaults.css:2:12)
+      border-bottom-width: 0 (reset-to-defaults.css:2:12)
+      border-right-width: 0 (reset-to-defaults.css:2:12)
+      outline-width: 0 (reset-to-defaults.css:2:12)
+      border-top-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      border-right-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      border-bottom-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      border-left-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      outline-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      -gtk-icon-source: builtin (reset-to-defaults.css:2:12)
+      -gtk-icon-palette: success rgb(115,210,22), warning rgb(245,121,0), error rgb(204,0,0) 
(reset-to-defaults.css:2:12)
+      label visible=1 state=dir-ltr
+        color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        font-size: 10px (nth-child.css:4:17)
+        -gtk-icon-theme: initial (reset-to-defaults.css:2:12)
+        background-color: rgba(0,0,0,0) (reset-to-defaults.css:2:12)
+        font-family: "Cantarell" (reset-to-defaults.css:2:12)
+        text-decoration-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-top-width: 0 (reset-to-defaults.css:2:12)
+        border-left-width: 0 (reset-to-defaults.css:2:12)
+        border-bottom-width: 0 (reset-to-defaults.css:2:12)
+        border-right-width: 0 (reset-to-defaults.css:2:12)
+        outline-width: 0 (reset-to-defaults.css:2:12)
+        border-top-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-right-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-bottom-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-left-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        outline-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        -gtk-icon-source: builtin (reset-to-defaults.css:2:12)
+        -gtk-icon-palette: success rgb(115,210,22), warning rgb(245,121,0), error rgb(204,0,0) 
(reset-to-defaults.css:2:12)
+      label visible=1 state=dir-ltr
+        color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        font-size: 20px (nth-child.css:7:17)
+        -gtk-icon-theme: initial (reset-to-defaults.css:2:12)
+        background-color: rgba(0,0,0,0) (reset-to-defaults.css:2:12)
+        font-family: "Cantarell" (reset-to-defaults.css:2:12)
+        text-decoration-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-top-width: 0 (reset-to-defaults.css:2:12)
+        border-left-width: 0 (reset-to-defaults.css:2:12)
+        border-bottom-width: 0 (reset-to-defaults.css:2:12)
+        border-right-width: 0 (reset-to-defaults.css:2:12)
+        outline-width: 0 (reset-to-defaults.css:2:12)
+        border-top-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-right-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-bottom-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-left-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        outline-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        -gtk-icon-source: builtin (reset-to-defaults.css:2:12)
+        -gtk-icon-palette: success rgb(115,210,22), warning rgb(245,121,0), error rgb(204,0,0) 
(reset-to-defaults.css:2:12)
+      label visible=1 state=dir-ltr
+        color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        font-size: 30px (nth-child.css:10:17)
+        -gtk-icon-theme: initial (reset-to-defaults.css:2:12)
+        background-color: rgba(0,0,0,0) (reset-to-defaults.css:2:12)
+        font-family: "Cantarell" (reset-to-defaults.css:2:12)
+        text-decoration-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-top-width: 0 (reset-to-defaults.css:2:12)
+        border-left-width: 0 (reset-to-defaults.css:2:12)
+        border-bottom-width: 0 (reset-to-defaults.css:2:12)
+        border-right-width: 0 (reset-to-defaults.css:2:12)
+        outline-width: 0 (reset-to-defaults.css:2:12)
+        border-top-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-right-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-bottom-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-left-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        outline-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        -gtk-icon-source: builtin (reset-to-defaults.css:2:12)
+        -gtk-icon-palette: success rgb(115,210,22), warning rgb(245,121,0), error rgb(204,0,0) 
(reset-to-defaults.css:2:12)
+    box visible=1 state=dir-ltr classes=horizontal
+      color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      font-size: 11px (reset-to-defaults.css:2:12)
+      -gtk-icon-theme: initial (reset-to-defaults.css:2:12)
+      background-color: rgba(0,0,0,0) (reset-to-defaults.css:2:12)
+      font-family: "Cantarell" (reset-to-defaults.css:2:12)
+      text-decoration-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      border-top-width: 0 (reset-to-defaults.css:2:12)
+      border-left-width: 0 (reset-to-defaults.css:2:12)
+      border-bottom-width: 0 (reset-to-defaults.css:2:12)
+      border-right-width: 0 (reset-to-defaults.css:2:12)
+      outline-width: 0 (reset-to-defaults.css:2:12)
+      border-top-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      border-right-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      border-bottom-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      border-left-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      outline-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+      -gtk-icon-source: builtin (reset-to-defaults.css:2:12)
+      -gtk-icon-palette: success rgb(115,210,22), warning rgb(245,121,0), error rgb(204,0,0) 
(reset-to-defaults.css:2:12)
+      label visible=1 state=dir-ltr
+        color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        font-size: 40px (nth-child.css:13:17)
+        -gtk-icon-theme: initial (reset-to-defaults.css:2:12)
+        background-color: rgba(0,0,0,0) (reset-to-defaults.css:2:12)
+        font-family: "Cantarell" (reset-to-defaults.css:2:12)
+        text-decoration-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-top-width: 0 (reset-to-defaults.css:2:12)
+        border-left-width: 0 (reset-to-defaults.css:2:12)
+        border-bottom-width: 0 (reset-to-defaults.css:2:12)
+        border-right-width: 0 (reset-to-defaults.css:2:12)
+        outline-width: 0 (reset-to-defaults.css:2:12)
+        border-top-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-right-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-bottom-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        border-left-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        outline-color: rgb(255,255,255) (reset-to-defaults.css:2:12)
+        -gtk-icon-source: builtin (reset-to-defaults.css:2:12)
+        -gtk-icon-palette: success rgb(115,210,22), warning rgb(245,121,0), error rgb(204,0,0) 
(reset-to-defaults.css:2:12)
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]