summaryrefslogtreecommitdiff
path: root/test/qa/cppunit
diff options
context:
space:
mode:
authorColomban Wendling <cwendling@hypra.fr>2023-01-31 11:25:28 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2023-03-03 10:57:11 +0000
commit655f6164e38c2f675beb5272fc6a9780f4767429 (patch)
tree583afce5ac496e805e4af0e00eac292ae3da32f1 /test/qa/cppunit
parent1791b26d75bd50971fe58627c6554f1711890817 (diff)
test: Run user dialog callback in idle time
On e.g. Windows we need to let the dialogs fully finish starting up before we can properly interact with them, and especially close them again. We notice new dialogs with the WindowActivate event, but this will happen before the dialog is fully set up internally, leading to failures on Windows. In practice, the WindowActivate event might be dispatched before the dialog setup function finishes, leading to an intermediate state at WindowActivate time. Work around this by running the user code in an idle timer in response to the WindowActivate event, so that the setup code can return before the callback is dispatched. Based on findings by Michael Weghorn, thanks! Change-Id: Ieecee09d84144570fe1943ca12dc1db6d9f64524 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146378 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'test/qa/cppunit')
-rw-r--r--test/qa/cppunit/dialog.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/qa/cppunit/dialog.cxx b/test/qa/cppunit/dialog.cxx
index c3f68a8f0e4e..0e188d52aa85 100644
--- a/test/qa/cppunit/dialog.cxx
+++ b/test/qa/cppunit/dialog.cxx
@@ -9,8 +9,8 @@
#include <test/a11y/accessibletestbase.hxx>
-// FIXME: dialog doesn't pop up on macos and doesn't close on win32...
-#if !defined(MACOSX) && !defined(_WIN32)
+// FIXME: dialog doesn't pop up on macos...
+#if !defined(MACOSX)
/* Checks an unexpected dialog opening (instead of the expected one) is properly caught, as it would
* otherwise block the test potentially indefinitely */
CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, SelfTestIncorrectDialog)
@@ -29,8 +29,8 @@ CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, SelfTestIncorrectDialog)
}
#endif
-// FIXME: dialog doesn't pop up on macos and doesn't close on win32...
-#if !defined(MACOSX) && !defined(_WIN32)
+// FIXME: dialog doesn't pop up on macos...
+#if !defined(MACOSX)
/* Checks that an exception in the dialog callback code is properly handled and won't disturb
* subsequent tests if caught -- especially that DialogWaiter::waitEndDialog() won't timeout. */
CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, SelfTestThrowInDialogCallback)