From 03af57e0da3b11ea42c29ff99ec71a0f083576a0 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 8 Sep 2016 09:15:43 -0700 Subject: [PATCH] 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... --- lib/installedtest.pm | 2 +- tests/freeipa_password_change_postinstall.pm | 2 +- tests/freeipa_webui_postinstall.pm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/installedtest.pm b/lib/installedtest.pm index 0d612174..bbbd271b 100644 --- a/lib/installedtest.pm +++ b/lib/installedtest.pm @@ -67,7 +67,7 @@ sub start_cockpit { my $self = shift; my $login = shift || 0; # 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"; # open a new tab so we don't race with the default page load # (also focuses the location bar for us) diff --git a/tests/freeipa_password_change_postinstall.pm b/tests/freeipa_password_change_postinstall.pm index fbdbf816..aff08196 100644 --- a/tests/freeipa_password_change_postinstall.pm +++ b/tests/freeipa_password_change_postinstall.pm @@ -8,7 +8,7 @@ sub run { $self->console_login(user=>'root'); # clear browser data so we don't go back to the 'admin' login 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"; start_webui("test1", "batterystaple"); assert_and_click "freeipa_webui_actions"; diff --git a/tests/freeipa_webui_postinstall.pm b/tests/freeipa_webui_postinstall.pm index f894d1a5..332e9f77 100644 --- a/tests/freeipa_webui_postinstall.pm +++ b/tests/freeipa_webui_postinstall.pm @@ -8,7 +8,7 @@ sub run { # we're restarting firefox (instead of using the same one from # freeipa_client_postinstall) so Firefox's trusted CA store # 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"; start_webui("admin", "monkeys123"); add_user("test3", "Three");