[gtk/matthiasc/css-change-tracking-4: 7/11] Add more testcases for change flags



commit d31ba1606509fc7593e46f780b5594f8aff3acda
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jan 16 22:37:54 2020 -0500

    Add more testcases for change flags

 testsuite/css/change/meson.build |  1 +
 testsuite/css/change/test4.css   | 25 +++++++++++++++++++++++++
 testsuite/css/change/test4.nodes |  8 ++++++++
 testsuite/css/change/test4.ui    | 39 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 73 insertions(+)
---
diff --git a/testsuite/css/change/meson.build b/testsuite/css/change/meson.build
index 8e9df3089b..66ae578fdb 100644
--- a/testsuite/css/change/meson.build
+++ b/testsuite/css/change/meson.build
@@ -23,6 +23,7 @@ test_data = [
   'test1.css', 'test1.ui', 'test1.nodes',
   'test2.css', 'test2.ui', 'test2.nodes',
   'test3.css', 'test3.ui', 'test3.nodes',
+  'test4.css', 'test4.ui', 'test4.nodes',
 ]
 
 if get_option('install-tests')
diff --git a/testsuite/css/change/test4.css b/testsuite/css/change/test4.css
new file mode 100644
index 0000000000..7a6367dacb
--- /dev/null
+++ b/testsuite/css/change/test4.css
@@ -0,0 +1,25 @@
+/* test negations */
+
+box {
+  color: red;
+}
+
+label.a:not(:hover) {
+  color: green;
+}
+
+label.b:not(:hover):backdrop {
+  color: green;
+}
+
+label:not(:hover) label.c {
+  color: green;
+}
+
+label:not(:hover):backdrop label.d {
+  color: green;
+}
+
+label:not(:hover):backdrop label.e:not(.f) {
+  color: green;
+}
diff --git a/testsuite/css/change/test4.nodes b/testsuite/css/change/test4.nodes
new file mode 100644
index 0000000000..a357d7b08a
--- /dev/null
+++ b/testsuite/css/change/test4.nodes
@@ -0,0 +1,8 @@
+[window.background:dir(ltr)]    
+  decoration:dir(ltr)    
+  box.horizontal:dir(ltr)    name
+    label.a:dir(ltr)    class|name|hover
+    label.b:dir(ltr)    class|name|hover|backdrop
+    label.c:dir(ltr)    class|name|parent-name|parent-hover
+    label.d:dir(ltr)    class|name|parent-name|parent-hover|parent-backdrop
+    label.e.f:dir(ltr)    
diff --git a/testsuite/css/change/test4.ui b/testsuite/css/change/test4.ui
new file mode 100644
index 0000000000..7ec26d956a
--- /dev/null
+++ b/testsuite/css/change/test4.ui
@@ -0,0 +1,39 @@
+<?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="GtkLabel">
+            <style><class name="a"/></style>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel">
+            <style><class name="b"/></style>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel">
+            <style><class name="c"/></style>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel">
+            <style><class name="d"/></style>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel">
+            <style><class name="e"/></style>
+            <style><class name="f"/></style>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>


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