[gtk+] Add a test for ltr vs rtl boxes.



commit d76fb63ba87e45c24ce916275d85a37b07fb3fc7
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 5 23:24:51 2016 -0500

    Add a test for ltr vs rtl boxes.
    
    This tests that horizontal boxes flip their child nodes
    according to text direction to maintain the left-to-right
    ordering of child nodes for both text directions.

 testsuite/css/nodes/Makefile.am   |    2 ++
 testsuite/css/nodes/box.ltr.nodes |    6 ++++++
 testsuite/css/nodes/box.ltr.ui    |   32 ++++++++++++++++++++++++++++++++
 testsuite/css/nodes/box.rtl.nodes |    6 ++++++
 testsuite/css/nodes/box.rtl.ui    |   32 ++++++++++++++++++++++++++++++++
 5 files changed, 78 insertions(+), 0 deletions(-)
---
diff --git a/testsuite/css/nodes/Makefile.am b/testsuite/css/nodes/Makefile.am
index 13130b8..b73a844 100644
--- a/testsuite/css/nodes/Makefile.am
+++ b/testsuite/css/nodes/Makefile.am
@@ -28,6 +28,8 @@ test_css_nodes_SOURCES = \
        $(NULL)
 
 test_data = \
+       box.ltr.ui      box.ltr.nodes           \
+       box.rtl.ui      box.rtl.nodes           \
        buttons.ui      buttons.nodes           \
        entries.ui      entries.nodes           \
        levelbar.ui     levelbar.nodes          \
diff --git a/testsuite/css/nodes/box.ltr.nodes b/testsuite/css/nodes/box.ltr.nodes
new file mode 100644
index 0000000..fae4431
--- /dev/null
+++ b/testsuite/css/nodes/box.ltr.nodes
@@ -0,0 +1,6 @@
+[window.background:dir(ltr)]
+  decoration:dir(ltr)
+  box.horizontal:dir(ltr)
+    label#label1:dir(ltr)
+    label#label2:dir(ltr)
+    label#label3:dir(ltr)
diff --git a/testsuite/css/nodes/box.ltr.ui b/testsuite/css/nodes/box.ltr.ui
new file mode 100644
index 0000000..7e774e9
--- /dev/null
+++ b/testsuite/css/nodes/box.ltr.ui
@@ -0,0 +1,32 @@
+<?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>
+        <property name="orientation">horizontal</property>
+        <child>
+          <object class="GtkLabel">
+            <property name="visible">True</property>
+            <property name="name">label1</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel">
+            <property name="visible">True</property>
+            <property name="name">label2</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel">
+            <property name="visible">True</property>
+            <property name="name">label3</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/testsuite/css/nodes/box.rtl.nodes b/testsuite/css/nodes/box.rtl.nodes
new file mode 100644
index 0000000..38e3e59
--- /dev/null
+++ b/testsuite/css/nodes/box.rtl.nodes
@@ -0,0 +1,6 @@
+[window.background:dir(rtl)]
+  decoration:dir(ltr)
+  box.horizontal:dir(rtl)
+    label#label3:dir(ltr)
+    label#label2:dir(ltr)
+    label#label1:dir(ltr)
diff --git a/testsuite/css/nodes/box.rtl.ui b/testsuite/css/nodes/box.rtl.ui
new file mode 100644
index 0000000..7e774e9
--- /dev/null
+++ b/testsuite/css/nodes/box.rtl.ui
@@ -0,0 +1,32 @@
+<?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>
+        <property name="orientation">horizontal</property>
+        <child>
+          <object class="GtkLabel">
+            <property name="visible">True</property>
+            <property name="name">label1</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel">
+            <property name="visible">True</property>
+            <property name="name">label2</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel">
+            <property name="visible">True</property>
+            <property name="name">label3</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>


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