[gtk/wip/matthiasc/css-values: 6/8] Add some css style tests



commit 8be919d0f14947265c3fd04e65d0e7bff8c58270
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jan 13 09:14:23 2020 -0500

    Add some css style tests
    
    These are meant to test selectors.

 testsuite/css/style/meson.build            |  3 +++
 testsuite/css/style/simple-selectors.css   | 23 +++++++++++++++++++++++
 testsuite/css/style/simple-selectors.nodes | 17 +++++++++++++++++
 testsuite/css/style/simple-selectors.ui    | 30 ++++++++++++++++++++++++++++++
 4 files changed, 73 insertions(+)
---
diff --git a/testsuite/css/style/meson.build b/testsuite/css/style/meson.build
index fa2515f313..e9bac2b8f0 100644
--- a/testsuite/css/style/meson.build
+++ b/testsuite/css/style/meson.build
@@ -52,6 +52,9 @@ test_data = [
   'nth-child.css',
   'nth-child.nodes',
   'nth-child.ui',
+  'simple-selectors.css',
+  'simple-selectors.nodes',
+  'simple-selectors.ui'
 ]
 
 if get_option('install-tests')
diff --git a/testsuite/css/style/simple-selectors.css b/testsuite/css/style/simple-selectors.css
new file mode 100644
index 0000000000..786ba4aa2a
--- /dev/null
+++ b/testsuite/css/style/simple-selectors.css
@@ -0,0 +1,23 @@
+label {
+  color: red;
+}
+
+*:not(label) {
+  background-color: red;
+}
+
+.normal-icons {
+  color: green;
+}
+
+*:not(.normal-icons) {
+  background-color: green;
+}
+
+*:disabled {
+  color: blue;
+}
+
+*:not(:disabled) {
+  background-color: blue;
+}
diff --git a/testsuite/css/style/simple-selectors.nodes b/testsuite/css/style/simple-selectors.nodes
new file mode 100644
index 0000000000..3cebe2c3f3
--- /dev/null
+++ b/testsuite/css/style/simple-selectors.nodes
@@ -0,0 +1,17 @@
+[window.background:dir(ltr)]
+  background-color: rgb(0,0,255); /* simple-selectors.css:22:3-26 */
+
+  decoration:dir(ltr)
+    background-color: rgb(0,0,255); /* simple-selectors.css:22:3-26 */
+  box.horizontal:dir(ltr)
+    background-color: rgb(0,0,255); /* simple-selectors.css:22:3-26 */
+
+    label:dir(ltr)
+      color: rgb(255,0,0); /* simple-selectors.css:2:3-14 */
+      background-color: rgb(0,0,255); /* simple-selectors.css:22:3-26 */
+    image.normal-icons:dir(ltr)
+      color: rgb(0,128,0); /* simple-selectors.css:10:3-16 */
+      background-color: rgb(0,0,255); /* simple-selectors.css:22:3-26 */
+    spinner:disabled:dir(ltr)
+      color: rgb(0,0,255); /* simple-selectors.css:18:3-15 */
+      background-color: rgb(0,128,0); /* simple-selectors.css:14:3-27 */
diff --git a/testsuite/css/style/simple-selectors.ui b/testsuite/css/style/simple-selectors.ui
new file mode 100644
index 0000000000..a09bb01d4d
--- /dev/null
+++ b/testsuite/css/style/simple-selectors.ui
@@ -0,0 +1,30 @@
+
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <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="GtkLabel">
+            <property name="visible">True</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkImage">
+            <property name="visible">True</property>
+            <property name="icon-size">normal</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkSpinner">
+            <property name="visible">True</property>
+            <property name="sensitive">0</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>


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