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

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon May 9 05:23:01 UTC 2016


 loolwsd/test/helpers.hpp |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit b0843ba443676cd24467f5eec7cbcdd4c4ec5ddc
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Mon May 9 00:39:01 2016 -0400

    loolwsd: test helpers accept smart pointer WebSocket too
    
    Change-Id: I83e62c7ce0daa6e44fb7f163607436640c9b9f08
    Reviewed-on: https://gerrit.libreoffice.org/24781
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/test/helpers.hpp b/loolwsd/test/helpers.hpp
index a31d19a..22f57b7 100644
--- a/loolwsd/test/helpers.hpp
+++ b/loolwsd/test/helpers.hpp
@@ -65,6 +65,12 @@ void sendTextFrame(Poco::Net::WebSocket& socket, const std::string& string)
 }
 
 inline
+void sendTextFrame(const std::shared_ptr<Poco::Net::WebSocket>& socket, const std::string& string)
+{
+    sendTextFrame(*socket, string);
+}
+
+inline
 bool isDocumentLoaded(Poco::Net::WebSocket& ws, std::string name = "")
 {
     if (!name.empty())
@@ -257,6 +263,12 @@ void getResponseMessage(Poco::Net::WebSocket& ws, const std::string& prefix, std
 }
 
 inline
+void getResponseMessage(const std::shared_ptr<Poco::Net::WebSocket>& ws, const std::string& prefix, std::string& response, const bool isLine)
+{
+    getResponseMessage(ws, prefix, response, isLine);
+}
+
+inline
 std::vector<char> getResponseMessage(Poco::Net::WebSocket& ws, const std::string& prefix)
 {
     try
@@ -326,6 +338,11 @@ std::vector<char> getResponseMessage(Poco::Net::WebSocket& ws, const std::string
     return std::vector<char>();
 }
 
+inline
+std::vector<char> getResponseMessage(const std::shared_ptr<Poco::Net::WebSocket>& ws, const std::string& prefix)
+{
+    return getResponseMessage(*ws, prefix);
+}
 
 inline
 std::shared_ptr<Poco::Net::WebSocket> loadDocAndGetSocket(const Poco::URI& uri, const std::string& documentURL)


More information about the Libreoffice-commits mailing list