start firefox at 1024x768 resolution

when we run firefox in a bare X session, by default we get an
800x600 firefox in a 1024x768 X server with some dead black
space to the right and bottom of the screen. Now it turns out
that if the mouse is in the dead space, Firefox will not get
any keystrokes we send.

This didn't used to be a problem, but I made it into one with
this os-autoinst change:

https://github.com/os-autoinst/os-autoinst/pull/559

that makes os-autoinst move the cursor to 1023,767 after each
`assert_and_click`, instead of 0x0 as it did before, unless the
cursor has previously been explicitly place somewhere. So in
this case it gets moved to the dead space, and Firefox stops
responding to keypresses after the first `assert_and_click`.

We could equally well fix this by setting the cursor to 0,0
after running Firefox, but I like this more as it makes sure
we won't run into the same problem some other way, and makes
the videos and screenshots look nicer.

This fixes the realmd_join_cockpit test that's been failing
ever since I installed an os-autoinst with that fix. Committing
without review as it's a straightforward fix and I want the
test working again...
This commit is contained in:
Adam Williamson 2016-09-08 09:15:43 -07:00
parent db95bccd52
commit 03af57e0da
3 changed files with 3 additions and 3 deletions

View File

@ -67,7 +67,7 @@ sub start_cockpit {
my $self = shift; my $self = shift;
my $login = shift || 0; my $login = shift || 0;
# run firefox directly in X as root. never do this, kids! # run firefox directly in X as root. never do this, kids!
type_string "startx /usr/bin/firefox\n"; type_string "startx /usr/bin/firefox -width 1024 -height 768\n";
assert_screen "firefox"; assert_screen "firefox";
# open a new tab so we don't race with the default page load # open a new tab so we don't race with the default page load
# (also focuses the location bar for us) # (also focuses the location bar for us)

View File

@ -8,7 +8,7 @@ sub run {
$self->console_login(user=>'root'); $self->console_login(user=>'root');
# clear browser data so we don't go back to the 'admin' login # clear browser data so we don't go back to the 'admin' login
assert_script_run 'rm -rf /root/.mozilla'; assert_script_run 'rm -rf /root/.mozilla';
type_string "startx /usr/bin/firefox\n"; type_string "startx /usr/bin/firefox -width 1024 -height 768\n";
assert_screen "firefox"; assert_screen "firefox";
start_webui("test1", "batterystaple"); start_webui("test1", "batterystaple");
assert_and_click "freeipa_webui_actions"; assert_and_click "freeipa_webui_actions";

View File

@ -8,7 +8,7 @@ sub run {
# we're restarting firefox (instead of using the same one from # we're restarting firefox (instead of using the same one from
# freeipa_client_postinstall) so Firefox's trusted CA store # freeipa_client_postinstall) so Firefox's trusted CA store
# refreshes and it trusts the web server cert # refreshes and it trusts the web server cert
type_string "startx /usr/bin/firefox\n"; type_string "startx /usr/bin/firefox -width 1024 -height 768\n";
assert_screen "firefox"; assert_screen "firefox";
start_webui("admin", "monkeys123"); start_webui("admin", "monkeys123");
add_user("test3", "Three"); add_user("test3", "Three");