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("\ |