diff options
-rw-r--r-- | include/test/a11y/accessibletestbase.hxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/accessibility/dialogs.cxx | 24 | ||||
-rw-r--r-- | test/qa/cppunit/dialog.cxx | 9 | ||||
-rw-r--r-- | test/source/a11y/accessibletestbase.cxx | 9 |
4 files changed, 18 insertions, 26 deletions
diff --git a/include/test/a11y/accessibletestbase.hxx b/include/test/a11y/accessibletestbase.hxx index 1445d0eb4737..e23c2e12467e 100644 --- a/include/test/a11y/accessibletestbase.hxx +++ b/include/test/a11y/accessibletestbase.hxx @@ -181,6 +181,7 @@ protected: const css::uno::Reference<css::accessibility::XAccessibleContext>& xChild, const EventPosterHelperBase* pEventPosterHelper = nullptr); +#if !defined(MACOSX) /* Dialog handling */ class Dialog : public test::AccessibleEventPosterHelper { @@ -286,6 +287,7 @@ protected: static std::shared_ptr<DialogWaiter> awaitDialog(const std::u16string_view name, std::function<void(Dialog&)> callback, bool bAutoClose = true); +#endif //defined(MACOSX) public: virtual void setUp() override; diff --git a/sw/qa/extras/accessibility/dialogs.cxx b/sw/qa/extras/accessibility/dialogs.cxx index e6e3ac84c068..7997f7743b1e 100644 --- a/sw/qa/extras/accessibility/dialogs.cxx +++ b/sw/qa/extras/accessibility/dialogs.cxx @@ -17,8 +17,9 @@ using namespace css; -// FIXME: dialog doesn't pop up on macos... +// FIXME: dialog API doesn't work on macos yet #if !defined(MACOSX) + CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestSpecialCharactersDialog) { load(u"private:factory/swriter"); @@ -62,10 +63,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestSpecialCharactersDialo CPPUNIT_ASSERT_EQUAL(rtl::OUString(u"<PARAGRAPH>©</PARAGRAPH>"), collectText()); } -#endif -// 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) { @@ -96,10 +94,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, TestSpecialCharactersDialogFocu CPPUNIT_ASSERT_EQUAL(rtl::OUString(u"<PARAGRAPH>0</PARAGRAPH>"), collectText()); } -#endif -// FIXME: dialog doesn't pop up on macos... -#if !defined(MACOSX) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestHyperlinkDialog) { load(u"private:factory/swriter"); @@ -123,10 +118,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestHyperlinkDialog) CPPUNIT_ASSERT_EQUAL(rtl::OUString("<PARAGRAPH>https://libreoffice.org/</PARAGRAPH>"), collectText()); } -#endif -// FIXME: dialog doesn't pop up on macos... -#if !defined(MACOSX) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestBookmarkDialog) { load(u"private:factory/swriter"); @@ -150,10 +142,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestBookmarkDialog) CPPUNIT_ASSERT_EQUAL(rtl::OUString("<PARAGRAPH>#Test Bookmark 1 Bookmark </PARAGRAPH>"), collectText()); } -#endif -// FIXME: dialog doesn't pop up on macos... -#if !defined(MACOSX) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestSectionDialog) { load(u"private:factory/swriter"); @@ -171,10 +160,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestSectionDialog) CPPUNIT_ASSERT_EQUAL(rtl::OUString("<PARAGRAPH/><PARAGRAPH/>"), collectText()); } -#endif -// FIXME: dialog doesn't pop up on macos... -#if !defined(MACOSX) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestFontworkDialog) { load(u"private:factory/swriter"); @@ -195,10 +181,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestFontworkDialog) "description=\"Paragraph: 0 Simple\">Simple</PARAGRAPH></SHAPE>"), collectText()); } -#endif -// FIXME: dialog doesn't pop up on macos... -#if !defined(MACOSX) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestFrameDialog) { load(u"private:factory/swriter"); @@ -216,6 +199,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestFrameDialog) rtl::OUString("<PARAGRAPH/><TEXT_FRAME name=\"Frame1\"><PARAGRAPH/></TEXT_FRAME>"), collectText()); } -#endif + +#endif //defined(MACOSX) /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ 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: */ |