[Libreoffice-commits] online.git: loolwsd/test
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Thu Jan 21 07:59:33 PST 2016
loolwsd/test/httpwstest.cpp | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 8ec0efe8bcd1bcd39f05f03a24bf919183bb6a28
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Thu Jan 21 10:53:07 2016 -0500
loolwsd: const correctness
Change-Id: Icf1e7d625f9217abf3abe5d9123347aa61e0a74c
Reviewed-on: https://gerrit.libreoffice.org/21687
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp
index 4a36c28..e18f63f 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -53,8 +53,8 @@ public:
void HTTPWSTest::testPaste()
{
// Load a document and make it empty.
- std::string documentPath = TDOC "/hello.odt";
- std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
+ const std::string documentPath = TDOC "/hello.odt";
+ const std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
sendTextFrame(_socket, "load url=" + documentURL);
sendTextFrame(_socket, "uno .uno:SelectAll");
sendTextFrame(_socket, "uno .uno:Delete");
@@ -74,8 +74,8 @@ void HTTPWSTest::testPaste()
n = _socket.receiveFrame(buffer, sizeof(buffer), flags);
if (n > 0 && (flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) != Poco::Net::WebSocket::FRAME_OP_CLOSE)
{
- std::string line = LOOLProtocol::getFirstLine(buffer, n);
- std::string prefix = "textselectioncontent: ";
+ const std::string line = LOOLProtocol::getFirstLine(buffer, n);
+ const std::string prefix = "textselectioncontent: ";
if (line.find(prefix) == 0)
{
selection = line.substr(prefix.length());
@@ -127,9 +127,9 @@ void HTTPWSTest::testLargePaste()
void HTTPWSTest::testRenderingOptions()
{
// Load a document and get its size.
- std::string documentPath = TDOC "/hide-whitespace.odt";
- std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
- std::string options = "{\"rendering\":{\".uno:HideWhitespace\":{\"type\":\"boolean\",\"value\":\"true\"}}}";
+ const std::string documentPath = TDOC "/hide-whitespace.odt";
+ const std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
+ const std::string options = "{\"rendering\":{\".uno:HideWhitespace\":{\"type\":\"boolean\",\"value\":\"true\"}}}";
sendTextFrame(_socket, "load url=" + documentURL + " options=" + options);
sendTextFrame(_socket, "status");
More information about the Libreoffice-commits
mailing list