]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/74-border-config.t
testsuite: delete obsolete makefile
[i3/i3] / testcases / t / 74-border-config.t
index c8a4d73de01e99e62c5c6b6d6614f76e85bdfdbe..cc1f5c90298137a0d3dc10928f0229c567061d9f 100644 (file)
@@ -6,8 +6,6 @@
 #
 
 use i3test;
-use X11::XCB qw(:all);
-use X11::XCB::Connection;
 
 my $x = X11::XCB::Connection->new;
 
@@ -21,19 +19,19 @@ my $config = <<EOT;
 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
 EOT
 
-my $process = launch_with_config($config);
+my $pid = launch_with_config($config);
 
 my $tmp = fresh_workspace;
 
 ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
 
-my $first = open_standard_window($x);
+my $first = open_window($x);
 
 my @content = @{get_ws_content($tmp)};
 ok(@content == 1, 'one container opened');
 is($content[0]->{border}, 'normal', 'border normal by default');
 
-exit_gracefully($process->pid);
+exit_gracefully($pid);
 
 #####################################################################
 # 2: check that new tiling windows start with '1pixel' border when
@@ -47,19 +45,19 @@ font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
 new_window 1pixel
 EOT
 
-$process = launch_with_config($config);
+$pid = launch_with_config($config);
 
 $tmp = fresh_workspace;
 
 ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
 
-$first = open_standard_window($x);
+$first = open_window($x);
 
 @content = @{get_ws_content($tmp)};
 ok(@content == 1, 'one container opened');
 is($content[0]->{border}, '1pixel', 'border normal by default');
 
-exit_gracefully($process->pid);
+exit_gracefully($pid);
 
 #####################################################################
 # 3: check that new floating windows start with 'normal' border unless
@@ -71,24 +69,13 @@ $config = <<EOT;
 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
 EOT
 
-$process = launch_with_config($config);
+$pid = launch_with_config($config);
 
 $tmp = fresh_workspace;
 
 ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
 
-# Create a floating window which is smaller than the minimum enforced size of i3
-$first = $x->root->create_child(
-    class => WINDOW_CLASS_INPUT_OUTPUT,
-    rect => [ 0, 0, 30, 30],
-    background_color => '#C0C0C0',
-    # replace the type with 'utility' as soon as the coercion works again in X11::XCB
-    window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'),
-);
-
-$first->map;
-
-sleep 0.25;
+$first = open_floating_window($x);
 
 my $wscontent = get_ws($tmp);
 my @floating = @{$wscontent->{floating_nodes}};
@@ -96,7 +83,7 @@ ok(@floating == 1, 'one floating container opened');
 my $floatingcon = $floating[0];
 is($floatingcon->{nodes}->[0]->{border}, 'normal', 'border normal by default');
 
-exit_gracefully($process->pid);
+exit_gracefully($pid);
 
 #####################################################################
 # 4: check that new floating windows start with '1pixel' border when
@@ -110,24 +97,13 @@ font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
 new_float 1pixel
 EOT
 
-$process = launch_with_config($config);
+$pid = launch_with_config($config);
 
 $tmp = fresh_workspace;
 
 ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
 
-# Create a floating window which is smaller than the minimum enforced size of i3
-$first = $x->root->create_child(
-    class => WINDOW_CLASS_INPUT_OUTPUT,
-    rect => [ 0, 0, 30, 30],
-    background_color => '#C0C0C0',
-    # replace the type with 'utility' as soon as the coercion works again in X11::XCB
-    window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'),
-);
-
-$first->map;
-
-sleep 0.25;
+$first = open_floating_window($x);
 
 $wscontent = get_ws($tmp);
 @floating = @{$wscontent->{floating_nodes}};
@@ -135,6 +111,6 @@ ok(@floating == 1, 'one floating container opened');
 $floatingcon = $floating[0];
 is($floatingcon->{nodes}->[0]->{border}, '1pixel', 'border normal by default');
 
-exit_gracefully($process->pid);
+exit_gracefully($pid);
 
 done_testing;