diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-06-11 14:53:08 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-06-11 14:56:38 +0000 |
commit | cfebff5dcfe77188e1c770e28d0e48e390e7c3e7 (patch) | |
tree | a2c6cb632b13fd7af0284d9a7c7a03b2548721f6 /testsuite | |
parent | d2cde1fb2df491e4b64c917d65546efec3f6f5be (diff) | |
download | gtk+-cfebff5dcfe77188e1c770e28d0e48e390e7c3e7.tar.gz |
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.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gtk/focus-chain/basic.left | 3 | ||||
-rw-r--r-- | testsuite/gtk/focus-chain/basic.right | 3 | ||||
-rw-r--r-- | testsuite/gtk/focus-chain/basic.tab | 1 | ||||
-rw-r--r-- | testsuite/gtk/focus-chain/basic.tab-backward | 1 | ||||
-rw-r--r-- | testsuite/gtk/meson.build | 2 | ||||
-rw-r--r-- | 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); |