diff options
author | Colomban Wendling <cwendling@hypra.fr> | 2023-01-31 11:25:28 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-03-03 10:57:11 +0000 |
commit | 655f6164e38c2f675beb5272fc6a9780f4767429 (patch) | |
tree | 583afce5ac496e805e4af0e00eac292ae3da32f1 /sw/qa/extras/accessibility | |
parent | 1791b26d75bd50971fe58627c6554f1711890817 (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 'sw/qa/extras/accessibility')
-rw-r--r-- | sw/qa/extras/accessibility/dialogs.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sw/qa/extras/accessibility/dialogs.cxx b/sw/qa/extras/accessibility/dialogs.cxx index 13c2fd0cb750..e6e3ac84c068 100644 --- a/sw/qa/extras/accessibility/dialogs.cxx +++ b/sw/qa/extras/accessibility/dialogs.cxx @@ -17,8 +17,8 @@ using namespace css; -// FIXME: dialog doesn't pop up on macos and doesn't close on win32... -#if !defined(_WIN32) && !defined(MACOSX) +// FIXME: dialog doesn't pop up on macos... +#if !defined(MACOSX) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestSpecialCharactersDialog) { load(u"private:factory/swriter"); @@ -64,8 +64,8 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestSpecialCharactersDialo } #endif -// FIXME: dialog doesn't pop up on macos and doesn't close on win32... -#if !defined(_WIN32) && !defined(MACOSX) +// FIXME: dialog doesn't pop up on macos... +#if !defined(MACOSX) /* checks for the fix from https://gerrit.libreoffice.org/c/core/+/147660 */ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, TestSpecialCharactersDialogFocus) { @@ -98,8 +98,8 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, TestSpecialCharactersDialogFocu } #endif -// FIXME: dialog doesn't pop up on macos and doesn't close on win32... -#if !defined(_WIN32) && !defined(MACOSX) +// FIXME: dialog doesn't pop up on macos... +#if !defined(MACOSX) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestHyperlinkDialog) { load(u"private:factory/swriter"); @@ -125,8 +125,8 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestHyperlinkDialog) } #endif -// FIXME: dialog doesn't pop up on macos and doesn't close on win32... -#if !defined(_WIN32) && !defined(MACOSX) +// FIXME: dialog doesn't pop up on macos... +#if !defined(MACOSX) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestBookmarkDialog) { load(u"private:factory/swriter"); @@ -152,8 +152,8 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestBookmarkDialog) } #endif -// FIXME: dialog doesn't pop up on macos and doesn't close on win32... -#if !defined(_WIN32) && !defined(MACOSX) +// FIXME: dialog doesn't pop up on macos... +#if !defined(MACOSX) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestSectionDialog) { load(u"private:factory/swriter"); @@ -173,8 +173,8 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestSectionDialog) } #endif -// FIXME: dialog doesn't pop up on macos and doesn't close on win32... -#if !defined(_WIN32) && !defined(MACOSX) +// FIXME: dialog doesn't pop up on macos... +#if !defined(MACOSX) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestFontworkDialog) { load(u"private:factory/swriter"); @@ -197,8 +197,8 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestFontworkDialog) } #endif -// FIXME: dialog doesn't pop up on macos and doesn't close on win32... -#if !defined(_WIN32) && !defined(MACOSX) +// FIXME: dialog doesn't pop up on macos... +#if !defined(MACOSX) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestFrameDialog) { load(u"private:factory/swriter"); |