From d52b97175b02745c1d9afab03256419bbebdf48d Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 21 Feb 2023 14:07:38 +0100 Subject: qa: call ProcessEventsToIdle inside dispatchCommand Change-Id: I909e6f334f4a659282141a97ccb3ffdea6ecc364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147397 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- unotest/Library_unotest.mk | 1 + unotest/source/cpp/macros_test.cxx | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'unotest') 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 #include #include +#include using namespace css; @@ -90,7 +91,10 @@ MacrosTest::dispatchCommand(const uno::Reference& xComponent, uno::Reference 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 MacrosTest::parseExportStream(const OUString& url, -- cgit