tests: lib/i3test: Remove open_standard_window, introduce open_window

open_window has a better API than open_standard_window. It uses named
parameters and supplies default values for everything you don’t specify. This
way, you can use every feature which X11::XCB::Window supports.
This commit is contained in:
Michael Stapelberg
2011-09-24 15:11:37 +01:00
parent c3eb9f6c45
commit de5286da59
38 changed files with 207 additions and 386 deletions

View File

@ -27,8 +27,8 @@ my $tmp = fresh_workspace;
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
my $first = open_standard_window($x);
my $second = open_standard_window($x);
my $first = open_window($x);
my $second = open_window($x);
sync_with_i3($x);
@ -56,8 +56,8 @@ $tmp = fresh_workspace;
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
$first = open_standard_window($x);
$second = open_standard_window($x);
$first = open_window($x);
$second = open_window($x);
sync_with_i3($x);
@ -72,8 +72,8 @@ is($content[0]->{layout}, 'stacked', 'layout stacked');
#####################################################################
cmd 'focus parent';
my $right_top = open_standard_window($x);
my $right_bot = open_standard_window($x);
my $right_top = open_window($x);
my $right_bot = open_window($x);
@content = @{get_ws_content($tmp)};
is(@content, 2, 'two cons at workspace level after focus parent');