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

New commits:
commit b0843ba443676cd24467f5eec7cbcdd4c4ec5ddc
Author: Ashod Nakashian <ashod.nakash...@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 <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@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)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to