summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/uitest/writer_tests5/xwindow.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/qa/uitest/writer_tests5/xwindow.py b/sw/qa/uitest/writer_tests5/xwindow.py
index 7e561fe8de2f..29a89bb5809c 100644
--- a/sw/qa/uitest/writer_tests5/xwindow.py
+++ b/sw/qa/uitest/writer_tests5/xwindow.py
@@ -140,6 +140,10 @@ class XWindow(UITestCase):
xToolkitRobot.keyPress(xKeyEvent)
xToolkitRobot.keyRelease(xKeyEvent)
+ # Wait for async events to be processed
+ xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
+ xToolkit.processEventsToIdle()
+
# remove mouse listener
xWindow.removeMouseListener(xMouseListener)
self.assertEqual(1, mouseListenerCount)
@@ -149,10 +153,6 @@ class XWindow(UITestCase):
xWindow.removeKeyListener(xKeyListener)
del xKeyListener
- # Wait for async events to be processed
- xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
- xToolkit.processEventsToIdle()
-
global keymousePressedEventsIntercepted
# Not expected any interceptions
self.assertEqual(0, keymousePressedEventsIntercepted)