[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - desktop/qa
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Sat May 7 20:43:44 UTC 2016
desktop/qa/desktop_lib/test_desktop_lib.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 21f93834c285afd5af85f97b2eba8df47f290aac
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sat May 7 16:32:57 2016 -0400
LOK: process idle events when testing event processing
Change-Id: Id340f69ab6b9d539d92163acc7a1468b98e02779
Reviewed-on: https://gerrit.libreoffice.org/24731
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index c8ce24c..60ddaa3 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -697,6 +697,7 @@ void DesktopLOKTest::testModifiedStatus()
m_bModified = false;
m_aStateChangedCondition.reset();
pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 't', 0);
+ Scheduler::ProcessEventsToIdle();
TimeValue aTimeValue = { 2 , 0 }; // 2 seconds max
m_aStateChangedCondition.wait(&aTimeValue);
Scheduler::ProcessEventsToIdle();
@@ -710,6 +711,7 @@ void DesktopLOKTest::testModifiedStatus()
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, aTempFile.GetURL().toUtf8().getStr(), "odt", "TakeOwnership"));
+ Scheduler::ProcessEventsToIdle();
m_aStateChangedCondition.wait(&aTimeValue);
Scheduler::ProcessEventsToIdle();
@@ -719,6 +721,7 @@ void DesktopLOKTest::testModifiedStatus()
// Modify the document again
m_aStateChangedCondition.reset();
pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 't', 0);
+ Scheduler::ProcessEventsToIdle();
m_aStateChangedCondition.wait(&aTimeValue);
Scheduler::ProcessEventsToIdle();
More information about the Libreoffice-commits
mailing list