i3/testcases/t/57-regress-fullscreen-level-up.t
Michael Stapelberg 49ea805905 tests: get the socket path from the X11 atom I3_SOCKET_PATH
The hard-coded socket paths are not useful when running the test suite in
parallel.
2011-07-25 13:35:56 +02:00

50 lines
1.3 KiB
Perl
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!perl
# vim:ts=4:sw=4:expandtab
#
# Regression test: level up should be a noop during fullscreen mode
#
use X11::XCB qw(:all);
use i3test;
BEGIN {
use_ok('X11::XCB::Window');
}
my $x = X11::XCB::Connection->new;
my $i3 = i3(get_socket_path());
my $tmp = fresh_workspace;
#####################################################################
# open a window, verify its not in fullscreen mode
#####################################################################
my $win = open_standard_window($x);
my $nodes = get_ws_content $tmp;
is(@$nodes, 1, 'exactly one client');
is($nodes->[0]->{fullscreen_mode}, 0, 'client not fullscreen');
#####################################################################
# make it fullscreen
#####################################################################
cmd 'nop making fullscreen';
cmd 'fullscreen';
my $nodes = get_ws_content $tmp;
is($nodes->[0]->{fullscreen_mode}, 1, 'client fullscreen now');
#####################################################################
# send level up, try to un-fullscreen
#####################################################################
cmd 'level up';
cmd 'fullscreen';
my $nodes = get_ws_content $tmp;
is($nodes->[0]->{fullscreen_mode}, 0, 'client not fullscreen any longer');
does_i3_live;
done_testing;