summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-01-15 18:42:20 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-01-15 18:43:31 -0500
commitbbfaacb59872c1de1a84d5ec0eb89573ef4ce055 (patch)
tree26a35bcc21ae80960613da6b72ba2089119d6ace
parentd89ff7181941d202d257337f8de4ee1da7cbcbea (diff)
downloadgtk+-bbfaacb59872c1de1a84d5ec0eb89573ef4ce055.tar.gz
Add a reftest for box flippingrtl-margins
Test that a horizontal box changes the order of its children in RTL, and that widget margins flip start and end. This tests the fix in d89ff7181941d202d2.
-rw-r--r--testsuite/reftests/box-flip.css23
-rw-r--r--testsuite/reftests/box-flip.ref.ui28
-rw-r--r--testsuite/reftests/box-flip.ui30
3 files changed, 81 insertions, 0 deletions
diff --git a/testsuite/reftests/box-flip.css b/testsuite/reftests/box-flip.css
new file mode 100644
index 0000000000..ffda8b0003
--- /dev/null
+++ b/testsuite/reftests/box-flip.css
@@ -0,0 +1,23 @@
+@import "reset-to-defaults.css";
+
+window {
+ background-color: purple;
+}
+
+#red {
+ background-color: red;
+ min-width: 100px;
+ min-height: 100px;
+}
+
+#yellow {
+ background-color: yellow;
+ min-width: 100px;
+ min-height: 100px;
+}
+
+#green {
+ background-color: green;
+ min-width: 100px;
+ min-height: 100px;
+}
diff --git a/testsuite/reftests/box-flip.ref.ui b/testsuite/reftests/box-flip.ref.ui
new file mode 100644
index 0000000000..d962c80327
--- /dev/null
+++ b/testsuite/reftests/box-flip.ref.ui
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow" id="window1">
+ <property name="decorated">0</property>
+ <property name="resizable">0</property>
+ <child>
+ <object class="GtkBox">
+ <child>
+ <object class="GtkDrawingArea">
+ <property name="name">green</property>
+ <property name="margin-end">50</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkDrawingArea">
+ <property name="name">yellow</property>
+ <property name="margin-end">10</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkDrawingArea">
+ <property name="name">red</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/testsuite/reftests/box-flip.ui b/testsuite/reftests/box-flip.ui
new file mode 100644
index 0000000000..8de1030f31
--- /dev/null
+++ b/testsuite/reftests/box-flip.ui
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow" id="window1">
+ <property name="decorated">0</property>
+ <property name="resizable">0</property>
+ <signal name="map" handler="reftest:set_default_direction_rtl" swapped="no"/>
+ <signal name="destroy" handler="reftest:set_default_direction_ltr" swapped="no"/>
+ <child>
+ <object class="GtkBox">
+ <child>
+ <object class="GtkDrawingArea">
+ <property name="name">red</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkDrawingArea">
+ <property name="name">yellow</property>
+ <property name="margin-start">10</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkDrawingArea">
+ <property name="margin-start">50</property>
+ <property name="name">green</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>