summaryrefslogtreecommitdiff
path: root/unotest
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-02-21 14:07:38 +0100
committerAndras Timar <andras.timar@collabora.com>2023-03-12 18:15:53 +0100
commit47b8e030f07d013a9fcb459522f3b22016c9b287 (patch)
treed69ef0fd2c50c9fd53cc946ad628b6c1a408f629 /unotest
parentce589388b4c18b67253a973e5952cd3962ac4223 (diff)
qa: call ProcessEventsToIdle inside dispatchCommand
Change-Id: I909e6f334f4a659282141a97ccb3ffdea6ecc364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147397 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148643
Diffstat (limited to 'unotest')
-rw-r--r--unotest/Library_unotest.mk1
-rw-r--r--unotest/source/cpp/macros_test.cxx6
2 files changed, 6 insertions, 1 deletions
diff --git a/unotest/Library_unotest.mk b/unotest/Library_unotest.mk
index 1a7f8ba5ab5f..a10342d46d7b 100644
--- a/unotest/Library_unotest.mk
+++ b/unotest/Library_unotest.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_Library_use_libraries,unotest,\
sb \
tl \
utl \
+ vcl \
))
$(eval $(call gb_Library_use_externals,unotest,\
diff --git a/unotest/source/cpp/macros_test.cxx b/unotest/source/cpp/macros_test.cxx
index 36438b2e50ec..3bb2a22a5da4 100644
--- a/unotest/source/cpp/macros_test.cxx
+++ b/unotest/source/cpp/macros_test.cxx
@@ -30,6 +30,7 @@
#include <tools/datetime.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
+#include <vcl/scheduler.hxx>
using namespace css;
@@ -90,7 +91,10 @@ MacrosTest::dispatchCommand(const uno::Reference<lang::XComponent>& xComponent,
uno::Reference<frame::XDispatchHelper> xDispatchHelper(frame::DispatchHelper::create(xContext));
CPPUNIT_ASSERT(xDispatchHelper.is());
- return xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues);
+ auto ret = xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+
+ return ret;
}
std::unique_ptr<SvStream> MacrosTest::parseExportStream(const OUString& url,