[Libreoffice-commits] online.git: loolwsd/test

Henry Castro hcastro at collabora.com
Wed May 11 05:00:05 UTC 2016


 loolwsd/test/TileCacheTests.cpp |    4 ++--
 loolwsd/test/httpwstest.cpp     |    7 +++----
 2 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 4abc68bfb7cef17ca56578e03e377e75acf01298
Author: Henry Castro <hcastro at collabora.com>
Date:   Wed May 11 01:01:18 2016 -0400

    loolwsd: test: update loading views

diff --git a/loolwsd/test/TileCacheTests.cpp b/loolwsd/test/TileCacheTests.cpp
index 0c9a84a..e271b29 100644
--- a/loolwsd/test/TileCacheTests.cpp
+++ b/loolwsd/test/TileCacheTests.cpp
@@ -176,7 +176,7 @@ void TileCacheTests::testSimpleCombine()
     CPPUNIT_ASSERT_MESSAGE("did not receive a tile: message as expected", !tile1b.empty());
 
     std::cerr << "Connecting second client." << std::endl;
-    auto socket2 = *loadDocAndGetSocket(_uri, documentURL);
+    auto socket2 = *loadDocAndGetSocket(_uri, documentURL, true);
     sendTextFrame(socket2, "tilecombine part=0 width=256 height=256 tileposx=0,3840 tileposy=0,0 tilewidth=3840 tileheight=3840");
 
     auto tile2a = getResponseMessage(socket2, "tile:");
@@ -199,7 +199,7 @@ void TileCacheTests::testUnresponsiveClient()
     getResponseMessage(socket1, "invalidatetiles");
 
     std::cerr << "Connecting second client." << std::endl;
-    auto socket2 = *loadDocAndGetSocket(_uri, documentURL);
+    auto socket2 = *loadDocAndGetSocket(_uri, documentURL, true);
 
     // Pathologically request tiles and fail to read (say slow connection).
     // Meanwhile, verify that others can get all tiles fine.
diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp
index 7a5aa46..8e74c05 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -411,7 +411,7 @@ void HTTPWSTest::testSaveOnDisconnect()
 
         Poco::Net::WebSocket socket2 = *connectLOKit(_uri, request, _response);
         sendTextFrame(socket2, "load url=" + documentURL);
-        CPPUNIT_ASSERT_MESSAGE("cannot load the document " + documentURL, isDocumentLoaded(socket2));
+        CPPUNIT_ASSERT_MESSAGE("cannot load the document " + documentURL, isDocumentLoaded(socket2, "", true));
         sendTextFrame(socket2, "userinactive");
 
         sendTextFrame(socket, "uno .uno:SelectAll");
@@ -1000,7 +1000,7 @@ void HTTPWSTest::testEditLock()
             try
             {
                 std::cerr << "First client loading." << std::endl;
-                auto socket = loadDocAndGetSocket(_uri, documentURL);
+                auto socket = loadDocAndGetSocket(_uri, documentURL, true);
                 std::string editlock1;
                 SocketProcessor("First", socket, [&](const std::string& msg)
                         {
@@ -1166,8 +1166,7 @@ void HTTPWSTest::testInactiveClient()
 
         // Connect another and go inactive.
         std::cerr << "Connecting second client." << std::endl;
-        auto socket2 = loadDocAndGetSocket(_uri, documentURL);
-        getResponseMessage(socket2, "status");
+        auto socket2 = loadDocAndGetSocket(_uri, documentURL, true);
         sendTextFrame(socket2, "userinactive");
 
         // While second is inactive, make some changes.


More information about the Libreoffice-commits mailing list