diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-27 14:10:00 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-27 14:29:55 +0200 |
commit | 436b4451c6f36ca23c966e2391cfcf94091b6db7 (patch) | |
tree | 72d4aa221029583dcb67bbf876e118bdd3004e40 /sd | |
parent | 9328df9598286a94f0cf097462045a3c0a5721fc (diff) |
CppunitTest_sd_tiledrendering: add search-not-found testcase
Fails without commit c0cc9a8622a2cd0e3ba07e15a79dd65ca910b233 (sd LOKit
callback for search not found, 2015-05-27).
Change-Id: I26ce4eab3d0bf3abc4a59d0dd21d5f2f5de78017
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 98890150dd97..b41c427d2a7a 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -74,13 +74,15 @@ private: #if !defined(WNT) && !defined(MACOSX) Rectangle m_aInvalidation; std::vector<Rectangle> m_aSelection; + bool m_bFound; sal_Int32 m_nPart; #endif }; SdTiledRenderingTest::SdTiledRenderingTest() #if !defined(WNT) && !defined(MACOSX) - : m_nPart(0) + : m_bFound(true), + m_nPart(0) #endif { } @@ -167,6 +169,11 @@ void SdTiledRenderingTest::callbackImpl(int nType, const char* pPayload) } } break; + case LOK_CALLBACK_SEARCH_NOT_FOUND: + { + m_bFound = false; + } + break; case LOK_CALLBACK_SET_PART: { OUString aPayload = OUString::createFromAscii(pPayload); @@ -353,6 +360,12 @@ void SdTiledRenderingTest::testSearch() // Search for something on the second slide, and make sure that the set-part callback fired. lcl_search("bbb"); CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), m_nPart); + CPPUNIT_ASSERT_EQUAL(true, m_bFound); + + // This should trigger the not-found callback. + Application::EnableHeadlessMode(false); + lcl_search("ccc"); + CPPUNIT_ASSERT_EQUAL(false, m_bFound); } #endif |