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.
This commit is contained in:
parent
66de41ac26
commit
5d0f8f8efa
@ -160,6 +160,10 @@ class TC_50_MimeHandlers:
|
|||||||
window_class = self.get_window_class(winid, dispvm)
|
window_class = self.get_window_class(winid, dispvm)
|
||||||
# close the window - we've got the window class, it is no longer needed
|
# close the window - we've got the window class, it is no longer needed
|
||||||
subprocess.check_call(['wmctrl', '-i', '-c', winid])
|
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:
|
try:
|
||||||
self.loop.run_until_complete(asyncio.wait_for(p.wait(), 30))
|
self.loop.run_until_complete(asyncio.wait_for(p.wait(), 30))
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
|
Loading…
Reference in New Issue
Block a user