[gtk] testsuite: more focus-chain output
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] testsuite: more focus-chain output
- Date: Tue, 11 Jun 2019 14:59:24 +0000 (UTC)
commit cfebff5dcfe77188e1c770e28d0e48e390e7c3e7
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 11 14:53:08 2019 +0000
testsuite: more focus-chain output
Differentiate between wrapping around and
stopping at the end of the focus chain.
Update the existing tests, and add two
new ones where the difference matters.
testsuite/gtk/focus-chain/basic.left | 3 +++
testsuite/gtk/focus-chain/basic.right | 3 +++
testsuite/gtk/focus-chain/basic.tab | 1 +
testsuite/gtk/focus-chain/basic.tab-backward | 1 +
testsuite/gtk/meson.build | 2 ++
testsuite/gtk/test-focus-chain.c | 10 ++++++++--
6 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/testsuite/gtk/focus-chain/basic.left b/testsuite/gtk/focus-chain/basic.left
new file mode 100644
index 0000000000..de2b1083db
--- /dev/null
+++ b/testsuite/gtk/focus-chain/basic.left
@@ -0,0 +1,3 @@
+entry2 GtkText
+entry1 GtkText
+STOP
diff --git a/testsuite/gtk/focus-chain/basic.right b/testsuite/gtk/focus-chain/basic.right
new file mode 100644
index 0000000000..343910ac5b
--- /dev/null
+++ b/testsuite/gtk/focus-chain/basic.right
@@ -0,0 +1,3 @@
+entry1 GtkText
+entry2 GtkText
+STOP
diff --git a/testsuite/gtk/focus-chain/basic.tab b/testsuite/gtk/focus-chain/basic.tab
index 120555fb03..cf87509577 100644
--- a/testsuite/gtk/focus-chain/basic.tab
+++ b/testsuite/gtk/focus-chain/basic.tab
@@ -1,2 +1,3 @@
entry1 GtkText
entry2 GtkText
+WRAP
diff --git a/testsuite/gtk/focus-chain/basic.tab-backward b/testsuite/gtk/focus-chain/basic.tab-backward
index 7a00af5387..764592b8e7 100644
--- a/testsuite/gtk/focus-chain/basic.tab-backward
+++ b/testsuite/gtk/focus-chain/basic.tab-backward
@@ -1,2 +1,3 @@
entry2 GtkText
entry1 GtkText
+WRAP
diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build
index 60163207fe..f331e02d41 100644
--- a/testsuite/gtk/meson.build
+++ b/testsuite/gtk/meson.build
@@ -134,6 +134,8 @@ focus_chain_tests = [
# test direction
[ 'basic', 'tab' ],
[ 'basic', 'tab-backward' ],
+ [ 'basic', 'left' ],
+ [ 'basic', 'right' ],
]
focus_chain = executable(
diff --git a/testsuite/gtk/test-focus-chain.c b/testsuite/gtk/test-focus-chain.c
index f8ac319947..dac0d114ac 100644
--- a/testsuite/gtk/test-focus-chain.c
+++ b/testsuite/gtk/test-focus-chain.c
@@ -123,10 +123,16 @@ generate_focus_chain (GtkWidget *window,
name = g_strdup ("NONE");
if (first && g_str_equal (name, first))
- break; /* cycle completed */
+ {
+ g_string_append (output, "WRAP\n");
+ break; /* cycle completed */
+ }
if (last && g_str_equal (name, last))
- break; /* dead end */
+ {
+ g_string_append (output, "STOP\n");
+ break; /* dead end */
+ }
g_string_append_printf (output, "%s\n", name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]