summaryrefslogtreecommitdiff
path: root/unotest
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-02-21 14:07:38 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-02-21 20:20:29 +0000
commitd52b97175b02745c1d9afab03256419bbebdf48d (patch)
tree597c57707b578d08e9d6c5a90e17c00ff1a666bd /unotest
parent88e29df0c216c300b9388ee2822003da2bee8679 (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>
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,