Index: test/WebRequest.cpp |
=================================================================== |
--- a/test/WebRequest.cpp |
+++ b/test/WebRequest.cpp |
@@ -52,18 +52,18 @@ namespace |
template<class T> |
class WebRequestTest : public BaseJsTest |
{ |
protected: |
void SetUp() |
{ |
BaseJsTest::SetUp(); |
- jsEngine->SetWebRequest(AdblockPlus::WebRequestPtr(new T)); |
- jsEngine->SetFileSystem(AdblockPlus::FileSystemPtr(new LazyFileSystem)); |
+ jsEngine->SetWebRequest(AdblockPlus::WebRequestPtr(new T())); |
+ jsEngine->SetFileSystem(AdblockPlus::FileSystemPtr(new LazyFileSystem())); |
} |
}; |
typedef WebRequestTest<MockWebRequest> MockWebRequestTest; |
typedef WebRequestTest<AdblockPlus::DefaultWebRequest> DefaultWebRequestTest; |
typedef WebRequestTest<MockWebRequest> XMLHttpRequestTest; |
void ResetTestXHR(const AdblockPlus::JsEnginePtr& jsEngine) |
@@ -202,17 +202,17 @@ namespace |
} |
}; |
typedef std::shared_ptr<CatchLogSystem> CatchLogSystemPtr; |
} |
TEST_F(XMLHttpRequestTest, RequestHeaderValidation) |
{ |
- auto catchLogSystem = CatchLogSystemPtr(new CatchLogSystem); |
+ auto catchLogSystem = std::make_shared<CatchLogSystem>(); |
jsEngine->SetLogSystem(catchLogSystem); |
AdblockPlus::FilterEngine filterEngine(jsEngine); |
auto webRequest = |
std::static_pointer_cast<MockWebRequest>(jsEngine->GetWebRequest()); |
ASSERT_TRUE(webRequest); |