summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorFakabbir Amin <fakabbir@gmail.com>2017-02-17 19:48:40 +0530
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-20 08:57:03 +0000
commit12fc1d5399a688a80eec2565a4b552377e428ab7 (patch)
treecc05c223ea6b15edc2220aca1bf0a2975743565e /sd/qa
parentb8d8fb3f0cf4a961bbff54523eaca1a4f8179c7a (diff)
tdf#84323: Make osl::Condition::wait more readable
Improved readability of calls to osl::Condition::wait. Change-Id: I69fb9815561013f1eb9fd4a649e32902e09473c6 Reviewed-on: https://gerrit.libreoffice.org/34399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index cbb8703b30be..2013bfe949c8 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -45,6 +45,8 @@
#include <sfx2/request.hxx>
#include <svx/svxids.hrc>
+#include <chrono>
+
using namespace css;
static const char* const DATA_DIRECTORY = "/sd/qa/unit/tiledrendering/data/";
@@ -668,8 +670,7 @@ void SdTiledRenderingTest::testInsertDeletePage()
for (unsigned it = 1; it <= 10; it++)
comphelper::dispatchCommand(".uno:InsertPage", aArgs);
- TimeValue aTimeValue = { 2 , 0 }; // 2 seconds max
- osl::Condition::Result aResult = m_aDocumentSizeCondition.wait(aTimeValue);
+ osl::Condition::Result aResult = m_aDocumentSizeCondition.wait(std::chrono::seconds(2));
CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok);
// Verify inserted slides
@@ -686,7 +687,7 @@ void SdTiledRenderingTest::testInsertDeletePage()
for (unsigned it = 1; it <= 10; it++)
comphelper::dispatchCommand(".uno:DeletePage", aArgs);
- aResult = m_aDocumentSizeCondition.wait(aTimeValue);
+ aResult = m_aDocumentSizeCondition.wait(std::chrono::seconds(2));
CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok);
// Verify deleted slides
@@ -702,7 +703,7 @@ void SdTiledRenderingTest::testInsertDeletePage()
for (unsigned it = 1; it <= 10; it++)
comphelper::dispatchCommand(".uno:Undo", aArgs);
- aResult = m_aDocumentSizeCondition.wait(aTimeValue);
+ aResult = m_aDocumentSizeCondition.wait(std::chrono::seconds(2));
CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok);
// Verify inserted slides
@@ -718,7 +719,7 @@ void SdTiledRenderingTest::testInsertDeletePage()
for (unsigned it = 1; it <= 10; it++)
comphelper::dispatchCommand(".uno:Redo", aArgs);
- aResult = m_aDocumentSizeCondition.wait(aTimeValue);
+ aResult = m_aDocumentSizeCondition.wait(std::chrono::seconds(2));
CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok);
// Verify deleted slides