forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
d2cde1fb2d
commit
cfebff5dcf
3
testsuite/gtk/focus-chain/basic.left
Normal file
3
testsuite/gtk/focus-chain/basic.left
Normal file
@ -0,0 +1,3 @@
|
||||
entry2 GtkText
|
||||
entry1 GtkText
|
||||
STOP
|
3
testsuite/gtk/focus-chain/basic.right
Normal file
3
testsuite/gtk/focus-chain/basic.right
Normal file
@ -0,0 +1,3 @@
|
||||
entry1 GtkText
|
||||
entry2 GtkText
|
||||
STOP
|
@ -1,2 +1,3 @@
|
||||
entry1 GtkText
|
||||
entry2 GtkText
|
||||
WRAP
|
||||
|
@ -1,2 +1,3 @@
|
||||
entry2 GtkText
|
||||
entry1 GtkText
|
||||
WRAP
|
||||
|
@ -134,6 +134,8 @@ focus_chain_tests = [
|
||||
# test direction
|
||||
[ 'basic', 'tab' ],
|
||||
[ 'basic', 'tab-backward' ],
|
||||
[ 'basic', 'left' ],
|
||||
[ 'basic', 'right' ],
|
||||
]
|
||||
|
||||
focus_chain = executable(
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user