Make sure the test window has focus

Some setups like xvfb-run under Linux do not focus windows
after showing them, this means that any focus based test will
fail since the windows itself is unfocused. This makes sure
the test window will be shown and focused.

Change-Id: I1903b7cdf88b772e1ca15acd4899695b49615712
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>