testcases: drop sync_with_i3()s $x parameter, use global

This commit is contained in:
Maik Fischer
2011-11-22 01:13:37 +01:00
committed by Michael Stapelberg
parent 293517fb2e
commit 0702f1fb7b
26 changed files with 59 additions and 61 deletions

View File

@ -36,7 +36,7 @@ cmd 'floating enable';
cmd '[id="' . $second->id . '"] focus';
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $second->id, 'second con focused');
@ -67,7 +67,7 @@ cmd 'floating enable';
cmd '[id="' . $second->id . '"] focus';
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $second->id, 'second con focused');
@ -103,13 +103,13 @@ cmd 'floating enable';
cmd '[id="' . $second->id . '"] focus';
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $second->id, 'second con focused');
cmd 'floating enable';
sync_with_i3($x);
sync_with_i3;
# now kill the second one. focus should fall back to the third one, which is
# also floating
@ -132,7 +132,7 @@ $tmp = fresh_workspace;
$first = open_window({ background_color => '#ff0000' }); # window 8
$second = open_window({ background_color => '#00ff00' }); # window 9
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $second->id, 'second container focused');
@ -142,31 +142,31 @@ is($x->input_focus, $second->id, 'second container focused');
cmd 'focus tiling';
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $first->id, 'first (tiling) container focused');
cmd 'focus floating';
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $second->id, 'second (floating) container focused');
cmd 'focus floating';
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $second->id, 'second (floating) container still focused');
cmd 'focus mode_toggle';
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $first->id, 'first (tiling) container focused');
cmd 'focus mode_toggle';
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $second->id, 'second (floating) container focused');
@ -180,37 +180,37 @@ $first = open_floating_window({ background_color => '#ff0000' });# window 10
$second = open_floating_window({ background_color => '#00ff00' }); # window 11
$third = open_floating_window({ background_color => '#0000ff' }); # window 12
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $third->id, 'third container focused');
cmd 'focus left';
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $second->id, 'second container focused');
cmd 'focus left';
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $first->id, 'first container focused');
cmd 'focus left';
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $third->id, 'focus wrapped to third container');
cmd 'focus right';
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $first->id, 'focus wrapped to first container');
cmd 'focus right';
sync_with_i3($x);
sync_with_i3;
is($x->input_focus, $second->id, 'focus on second container');