Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/WebRequest.cpp

Issue 29377775: Issue 4916 - Request compression in CURL WebRequest. (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Updated patch to fix test. Created March 2, 2017, 3:36 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/DefaultWebRequestCurl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/WebRequest.cpp
===================================================================
--- a/test/WebRequest.cpp
+++ b/test/WebRequest.cpp
@@ -84,16 +84,19 @@ TEST_F(DefaultWebRequestTest, RealWebReq
{
AdblockPlus::Sleep(200);
} while (jsEngine->Evaluate("this.foo")->IsUndefined());
ASSERT_EQ("text/plain", jsEngine->Evaluate("foo.responseHeaders['content-type'].substr(0, 10)")->AsString());
ASSERT_EQ(AdblockPlus::WebRequest::NS_OK, jsEngine->Evaluate("foo.status")->AsInt());
ASSERT_EQ(200, jsEngine->Evaluate("foo.responseStatus")->AsInt());
ASSERT_EQ("[Adblock Plus ", jsEngine->Evaluate("foo.responseText.substr(0, 14)")->AsString());
ASSERT_EQ("text/plain", jsEngine->Evaluate("foo.responseHeaders['content-type'].substr(0, 10)")->AsString());
+#if defined(HAVE_CURL)
+ ASSERT_EQ("gzip", jsEngine->Evaluate("foo.responseHeaders['content-encoding'].substr(0, 4)")->AsString());
+#endif
ASSERT_TRUE(jsEngine->Evaluate("foo.responseHeaders['location']")->IsUndefined());
}
TEST_F(DefaultWebRequestTest, XMLHttpRequest)
{
AdblockPlus::FilterEngine filterEngine(jsEngine);
jsEngine->Evaluate("\
« no previous file with comments | « src/DefaultWebRequestCurl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld