diff options
author | Colomban Wendling <cwendling@hypra.fr> | 2023-02-23 16:34:49 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-03-03 10:58:22 +0000 |
commit | d1589ade91cfadf860c31ca30c97a60f95afa928 (patch) | |
tree | 16de278e89cfb30d34a81f4fe0869e6dd97a1f12 /test | |
parent | 8a449f2de0d926967331436adfd3d5dd0b9e2db8 (diff) |
Disable test::AccessibleTestBase::awaitDialog() on macos altogether
The API doesn't actually work there yet because we don't get any event,
so there's no point in exposing it there, and it makes it clear it
isn't available there, avoiding future user to wonder why their tests
do not behave there.
Change-Id: I38dcc98ad3bc3b669df64bc1c53c91ef48a0d717
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147574
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'test')
-rw-r--r-- | test/qa/cppunit/dialog.cxx | 9 | ||||
-rw-r--r-- | test/source/a11y/accessibletestbase.cxx | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/test/qa/cppunit/dialog.cxx b/test/qa/cppunit/dialog.cxx index 0e188d52aa85..c69f41b58d7c 100644 --- a/test/qa/cppunit/dialog.cxx +++ b/test/qa/cppunit/dialog.cxx @@ -9,8 +9,9 @@ #include <test/a11y/accessibletestbase.hxx> -// FIXME: dialog doesn't pop up on macos... +// FIXME: dialog API doesn't work on macos yet #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) @@ -27,10 +28,7 @@ CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, SelfTestIncorrectDialog) * by the activateMenuItem() call above */ CPPUNIT_ASSERT_THROW(dialogWaiter->waitEndDialog(), css::uno::RuntimeException); } -#endif -// 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) @@ -46,7 +44,6 @@ CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, SelfTestThrowInDialogCallback) CPPUNIT_ASSERT(activateMenuItem(u"Insert", u"Hyperlink...")); CPPUNIT_ASSERT_THROW(dialogWaiter->waitEndDialog(), DummyException); } -#endif // Checks timeout if dialog does not show up as expected CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, SelfTestNoDialog) @@ -61,6 +58,8 @@ CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, SelfTestNoDialog) CPPUNIT_ASSERT(!dialogWaiter->waitEndDialog()); } +#endif //defined(MACOSX) + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/test/source/a11y/accessibletestbase.cxx b/test/source/a11y/accessibletestbase.cxx index 20d6c88a5e19..92a40e87f779 100644 --- a/test/source/a11y/accessibletestbase.cxx +++ b/test/source/a11y/accessibletestbase.cxx @@ -348,7 +348,13 @@ bool test::AccessibleTestBase::tabTo( return false; } -/* Dialog handling */ +#if !defined(MACOSX) +/* Dialog handling + * + * For now this doesn't actually work under macos, so the API is not available there not to create + * confusion. The problem there is we don't get notified of new dialogs, so we can't manage them + * or interact with them. + */ test::AccessibleTestBase::Dialog::Dialog(uno::Reference<awt::XDialog2>& xDialog2, bool bAutoClose) : mbAutoClose(bAutoClose) @@ -570,5 +576,6 @@ test::AccessibleTestBase::awaitDialog(const std::u16string_view name, return std::make_shared<ListenerHelper>(name, callback, bAutoClose); } +#endif //defined(MACOSX) /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |