[gtk/wip/matthiasc/context-menu: 29/29] Add a focus-chain test for focusable containers



commit f1edee0d6120443d70dd20d0446b46a905394870
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 11 17:10:16 2019 +0000

    Add a focus-chain test for focusable containers

 testsuite/gtk/focus-chain/focusable-container.tab  |  5 ++++
 .../focus-chain/focusable-container.tab-backward   |  5 ++++
 testsuite/gtk/focus-chain/focusable-container.ui   | 29 ++++++++++++++++++++++
 testsuite/gtk/meson.build                          |  2 ++
 4 files changed, 41 insertions(+)
---
diff --git a/testsuite/gtk/focus-chain/focusable-container.tab 
b/testsuite/gtk/focus-chain/focusable-container.tab
new file mode 100644
index 0000000000..21816d5316
--- /dev/null
+++ b/testsuite/gtk/focus-chain/focusable-container.tab
@@ -0,0 +1,5 @@
+entry1 GtkText
+box
+entry2 GtkText
+entry3 GtkText
+WRAP
diff --git a/testsuite/gtk/focus-chain/focusable-container.tab-backward 
b/testsuite/gtk/focus-chain/focusable-container.tab-backward
new file mode 100644
index 0000000000..46d54a6137
--- /dev/null
+++ b/testsuite/gtk/focus-chain/focusable-container.tab-backward
@@ -0,0 +1,5 @@
+entry3 GtkText
+entry2 GtkText
+box
+entry1 GtkText
+WRAP
diff --git a/testsuite/gtk/focus-chain/focusable-container.ui 
b/testsuite/gtk/focus-chain/focusable-container.ui
new file mode 100644
index 0000000000..e6d2947d20
--- /dev/null
+++ b/testsuite/gtk/focus-chain/focusable-container.ui
@@ -0,0 +1,29 @@
+<interface>
+  <object class="GtkWindow" id="window">
+    <child>
+      <object class="GtkBox">
+        <child>
+          <object class="GtkEntry">
+            <property name="name">entry1</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="name">box</property>
+            <property name="can-focus">1</property>
+            <child>
+              <object class="GtkEntry">
+               <property name="name">entry2</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkEntry">
+               <property name="name">entry3</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build
index f331e02d41..d3a4ea13f0 100644
--- a/testsuite/gtk/meson.build
+++ b/testsuite/gtk/meson.build
@@ -136,6 +136,8 @@ focus_chain_tests = [
   [ 'basic', 'tab-backward' ],
   [ 'basic', 'left' ],
   [ 'basic', 'right' ],
+  [ 'focusable-container', 'tab' ],
+  [ 'focusable-container', 'tab-backward' ],
 ]
 
 focus_chain = executable(


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