From 5d0f8f8efa9e2ae45ed2694b59de8533960e9b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 13 Apr 2019 21:50:34 +0200 Subject: [PATCH] tests/mime: confirm closing Firefox If Firefox is started for the first time, it will open both requested page and its welcome page. This means closing the window will trigger a confirmation about closing multiple tabs. Handle this. --- qubes/tests/integ/mime.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qubes/tests/integ/mime.py b/qubes/tests/integ/mime.py index 772344ef..2dbbfc8b 100644 --- a/qubes/tests/integ/mime.py +++ b/qubes/tests/integ/mime.py @@ -160,6 +160,10 @@ class TC_50_MimeHandlers: window_class = self.get_window_class(winid, dispvm) # close the window - we've got the window class, it is no longer needed subprocess.check_call(['wmctrl', '-i', '-c', winid]) + # confirm quit for example for Firefox + self.loop.run_until_complete(asyncio.sleep(1)) + subprocess.call(['xdotool', 'search', '--onlyvisible', '--name', + 'Quit', 'windowfocus', 'key', 'Return']) try: self.loop.run_until_complete(asyncio.wait_for(p.wait(), 30)) except asyncio.TimeoutError: