summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-01-18 12:13:31 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-01-18 16:30:28 -0500
commit9e281fb2b5730d896a357d1e7252c555b19bfd36 (patch)
treec543f16b260c20a5b6c28102d7e38b558c8b06c8
parentccda2a094f56ef71854b4f9b77daf9e8f4cfc01f (diff)
downloadgtk+-matthiasc/css-change-tracking-5.tar.gz
Add another css change testcasematthiasc/css-change-tracking-5
This one tests selectors similar to the ones we are using for linked buttons and entries, involving siblings and :first-child/:last-child.
-rw-r--r--testsuite/css/change/meson.build1
-rw-r--r--testsuite/css/change/test6.css19
-rw-r--r--testsuite/css/change/test6.nodes12
-rw-r--r--testsuite/css/change/test6.ui34
4 files changed, 66 insertions, 0 deletions
diff --git a/testsuite/css/change/meson.build b/testsuite/css/change/meson.build
index 59a2562710..90195d631c 100644
--- a/testsuite/css/change/meson.build
+++ b/testsuite/css/change/meson.build
@@ -25,6 +25,7 @@ test_data = [
'test3.css', 'test3.ui', 'test3.nodes',
'test4.css', 'test4.ui', 'test4.nodes',
'test5.css', 'test5.ui', 'test5.nodes',
+ 'test6.css', 'test6.ui', 'test6.nodes',
]
if get_option('install-tests')
diff --git a/testsuite/css/change/test6.css b/testsuite/css/change/test6.css
new file mode 100644
index 0000000000..9b49086829
--- /dev/null
+++ b/testsuite/css/change/test6.css
@@ -0,0 +1,19 @@
+/* a simplified version of some of the things we do for linked buttons and entries */
+
+box:not(.vertical).linked > button:not(:first-child) {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+box:not(.vertical).linked > button:not(:last-child) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+box:not(.vetical).linked > *:disabled ~ entry:disabled {
+ border-left-color: red;
+}
+
+box:not(.vetical).linked > entry:focus + button {
+ border-left-color: blue;
+}
diff --git a/testsuite/css/change/test6.nodes b/testsuite/css/change/test6.nodes
new file mode 100644
index 0000000000..60a5d85e85
--- /dev/null
+++ b/testsuite/css/change/test6.nodes
@@ -0,0 +1,12 @@
+window.background:dir(ltr)
+ decoration:dir(ltr)
+ box.horizontal.linked:dir(ltr)
+ button:dir(ltr) name|first-child|last-child|parent-class|parent-name
+ button:dir(ltr) name|first-child|last-child|sibling-name|sibling-state|parent-class|parent-name
+ button:dir(ltr) name|first-child|last-child|sibling-name|sibling-state|parent-class|parent-name
+ box.horizontal.linked:dir(ltr)
+ entry:dir(ltr)
+ text:dir(ltr)
+ undershoot.left:dir(ltr)
+ undershoot.right:dir(ltr)
+ button:dir(ltr) name|first-child|last-child|sibling-name|sibling-state|parent-class|parent-name
diff --git a/testsuite/css/change/test6.ui b/testsuite/css/change/test6.ui
new file mode 100644
index 0000000000..779c82628b
--- /dev/null
+++ b/testsuite/css/change/test6.ui
@@ -0,0 +1,34 @@
+
+<?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">
+ <style><class name="linked"/></style>
+ <child>
+ <object class="GtkButton"/>
+ </child>
+ <child>
+ <object class="GtkButton"/>
+ </child>
+ <child>
+ <object class="GtkButton"/>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <style><class name="linked"/></style>
+ <child>
+ <object class="GtkEntry"/>
+ </child>
+ <child>
+ <object class="GtkButton"/>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>