[Libreoffice-commits] online.git: loolwsd/test
Henry Castro
hcastro at collabora.com
Thu May 5 18:53:01 UTC 2016
loolwsd/test/httpwstest.cpp | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
New commits:
commit e03d4f7b77ed9830294a9cae94659486f545a480
Author: Henry Castro <hcastro at collabora.com>
Date: Thu May 5 14:53:34 2016 -0400
loolwsd: fix -Werror=shadow
diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp
index 73878b1..5397afd 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -1107,12 +1107,6 @@ void HTTPWSTest::testSlideShow()
{
try
{
- const std::string jail = "jail=";
- const std::string dir = "dir=";
- const std::string name = "name=";
- const std::string port = "port=";
- const std::string id = "id=";
-
// Load a document
std::string documentPath, documentURL;
std::string response;
@@ -1144,17 +1138,16 @@ void HTTPWSTest::testSlideShow()
const std::string path = "/" + jail + "/" + dir + "/" + name + "?mime_type=image/svg%2Bxml";
std::unique_ptr<Poco::Net::HTTPClientSession> session(helpers::createSession(_uri));
- Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, path);
- session->sendRequest(request);
-
- Poco::Net::HTTPResponse response;
- session->receiveResponse(response);
- CPPUNIT_ASSERT_EQUAL(Poco::Net::HTTPResponse::HTTP_OK, response.getStatus());
- CPPUNIT_ASSERT_EQUAL(std::string("image/svg+xml"), response.getContentType());
+ Poco::Net::HTTPRequest requestSVG(Poco::Net::HTTPRequest::HTTP_GET, path);
+ session->sendRequest(requestSVG);
- socket.shutdown();
- Util::removeFile(documentPath);
+ Poco::Net::HTTPResponse responseSVG;
+ session->receiveResponse(responseSVG);
+ CPPUNIT_ASSERT_EQUAL(Poco::Net::HTTPResponse::HTTP_OK, responseSVG.getStatus());
+ CPPUNIT_ASSERT_EQUAL(std::string("image/svg+xml"), responseSVG.getContentType());
}
+ socket.shutdown();
+ Util::removeFile(documentPath);
}
catch (const Poco::Exception& exc)
{
More information about the Libreoffice-commits
mailing list