From cdafb34b534535086b769264a9fdb926f9beea4a Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Tue, 20 Sep 2016 17:51:05 -0400 Subject: [PATCH] loolwsd: added impress tiles unittest Change-Id: I25036f6a9ad77ebd06991866245e89c1045fbea3 Reviewed-on: https://gerrit.libreoffice.org/29114 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian --- loolwsd/test/TileCacheTests.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/loolwsd/test/TileCacheTests.cpp b/loolwsd/test/TileCacheTests.cpp index b9f890004..71469d76c 100644 --- a/loolwsd/test/TileCacheTests.cpp +++ b/loolwsd/test/TileCacheTests.cpp @@ -53,6 +53,7 @@ class TileCacheTests : public CPPUNIT_NS::TestFixture CPPUNIT_TEST(testSimpleCombine); CPPUNIT_TEST(testPerformance); CPPUNIT_TEST(testUnresponsiveClient); + CPPUNIT_TEST(testImpressTiles); CPPUNIT_TEST(testClientPartImpress); CPPUNIT_TEST(testClientPartCalc); #if ENABLE_DEBUG @@ -69,6 +70,7 @@ class TileCacheTests : public CPPUNIT_NS::TestFixture void testSimpleCombine(); void testPerformance(); void testUnresponsiveClient(); + void testImpressTiles(); void testClientPartImpress(); void testClientPartCalc(); void testSimultaneousTilesRenderedJustOnce(); @@ -274,6 +276,22 @@ void TileCacheTests::testUnresponsiveClient() socket2.shutdown(); } +void TileCacheTests::testImpressTiles() +{ + try + { + const std::string testName = "impressTiles "; + auto socket = *loadDocAndGetSocket("setclientpart.odp", _uri, testName); + + sendTextFrame(socket, "tile part=0 width=180 height=135 tileposx=0 tileposy=0 tilewidth=15875 tileheight=11906 id=0", testName); + getTileMessage(socket, testName); + } + catch (const Poco::Exception& exc) + { + CPPUNIT_FAIL(exc.displayText()); + } +} + void TileCacheTests::testClientPartImpress() { try