From 0a46237093c1750ee69ddb6a365098dc1d06b758 Mon Sep 17 00:00:00 2001 From: Tamás Zolnai Date: Wed, 21 Feb 2018 17:47:59 +0100 Subject: Add some extra assert to this test case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To find out why this test fails for some linux tinderbox. Change-Id: I49d1afbbac631abe49378b12b888615e3e0e1bef Reviewed-on: https://gerrit.libreoffice.org/50121 Reviewed-by: Tamás Zolnai Tested-by: Tamás Zolnai --- sd/qa/unit/tiledrendering/tiledrendering.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index b7dd2d05d097..b938800a12c3 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -2062,9 +2062,7 @@ void SdTiledRenderingTest::testPasteTextOnSlide() // Load the document. comphelper::LibreOfficeKit::setActive(); SdXImpressDocument* pXImpressDocument = createDoc("paste_text_onslide.odp"); - - ViewCallback aView1; - SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback, &aView1); + CPPUNIT_ASSERT(pXImpressDocument); // select second text object pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::TAB); @@ -2110,7 +2108,10 @@ void SdTiledRenderingTest::testPasteTextOnSlide() Scheduler::ProcessEventsToIdle(); // Check the position of the newly added text shape, created for pasted text - SdrObject* pObject = pXImpressDocument->GetDocShell()->GetViewShell()->GetActualPage()->GetObj(2); + SdPage* pActualPage = pXImpressDocument->GetDocShell()->GetViewShell()->GetActualPage(); + CPPUNIT_ASSERT_EQUAL(static_cast(3), pActualPage->GetObjCount()); + SdrObject* pObject = pActualPage->GetObj(2); + CPPUNIT_ASSERT(pObject); SdrTextObj* pTextObj = dynamic_cast(pObject); CPPUNIT_ASSERT(pTextObj); CPPUNIT_ASSERT_EQUAL(static_cast(OBJ_TEXT), pTextObj->GetObjIdentifier()); -- cgit