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, 5)")->AsString()); |
Felix Dahlke
2017/03/02 14:33:39
Nit: Given how "gzip" is a four character string,
hub
2017/03/02 15:36:00
Acknowledged.
sergei
2017/03/02 21:05:26
Sorry, my bad, off by one error.
|
+#endif |
ASSERT_TRUE(jsEngine->Evaluate("foo.responseHeaders['location']")->IsUndefined()); |
} |
TEST_F(DefaultWebRequestTest, XMLHttpRequest) |
{ |
AdblockPlus::FilterEngine filterEngine(jsEngine); |
jsEngine->Evaluate("\ |