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

Ashod Nakashian ashod.nakashian at collabora.co.uk
Sat Oct 8 04:42:55 UTC 2016


 loolwsd/test/helpers.hpp |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit a18c404f296b723b841b1c0baafcfd8a92ae41af
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Fri Oct 7 23:38:11 2016 -0400

    loolwsd: log test name from more helpers
    
    Change-Id: I51240cf6dc3d2df3ed4b73f8a00dff968653de98
    Reviewed-on: https://gerrit.libreoffice.org/29606
    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 da1e8f9..28de935 100644
--- a/loolwsd/test/helpers.hpp
+++ b/loolwsd/test/helpers.hpp
@@ -589,29 +589,29 @@ inline int getCharKey(char ch, SpecialKey specialKeys)
     return result | specialKeys;
 }
 
-inline void sendKeyEvent(Poco::Net::WebSocket& socket, const char* type, int chr, int key)
+inline void sendKeyEvent(Poco::Net::WebSocket& socket, const char* type, int chr, int key, const std::string testname = "")
 {
     std::ostringstream ssIn;
     ssIn << "key type=" << type << " char=" << chr << " key=" << key;
-    sendTextFrame(socket, ssIn.str());
+    sendTextFrame(socket, ssIn.str(), testname);
 }
 
-inline void sendKeyPress(Poco::Net::WebSocket& socket, int chr, int key)
+inline void sendKeyPress(Poco::Net::WebSocket& socket, int chr, int key, const std::string testname)
 {
-    sendKeyEvent(socket, "input", chr, key);
-    sendKeyEvent(socket, "up", chr, key);
+    sendKeyEvent(socket, "input", chr, key, testname);
+    sendKeyEvent(socket, "up", chr, key, testname);
 }
 
-inline void sendChar(Poco::Net::WebSocket& socket, char ch, SpecialKey specialKeys=skNone)
+inline void sendChar(Poco::Net::WebSocket& socket, char ch, SpecialKey specialKeys=skNone, const std::string testname = "")
 {
-    sendKeyPress(socket, getCharChar(ch, specialKeys), getCharKey(ch, specialKeys));
+    sendKeyPress(socket, getCharChar(ch, specialKeys), getCharKey(ch, specialKeys), testname);
 }
 
-inline void sendText(Poco::Net::WebSocket& socket, const std::string& text)
+inline void sendText(Poco::Net::WebSocket& socket, const std::string& text, const std::string testname = "")
 {
     for (char ch : text)
     {
-        sendChar(socket, ch);
+        sendChar(socket, ch, skNone, testname);
     }
 }
 


More information about the Libreoffice-commits mailing list