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

Unified Diff: test/WebRequest.cpp

Issue 29433591: Issue 5180 - start to inject implementation of WebRequest into JsEngine::ctr (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created May 8, 2017, 11:59 a.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 | « test/UpdateCheck.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
diff --git a/test/WebRequest.cpp b/test/WebRequest.cpp
index 9e9b0b790284f9c6a757ae7a424dcc46ba6d0106..d78a92756dd993ffe59940abffb226536e182b9a 100644
--- a/test/WebRequest.cpp
+++ b/test/WebRequest.cpp
@@ -77,18 +77,21 @@ namespace
};
template<class T>
- class WebRequestTest : public BaseJsTest
+ class WebRequestTest : public ::testing::Test
{
protected:
void SetUp()
{
- BaseJsTest::SetUp();
+ JsEngineCreationParameters jsEngineParams;
+ jsEngineParams.timer.reset(new NoopTimer());
+ jsEngineParams.fileSystem.reset(new LazyFileSystem());
+ jsEngine = CreateJsEngine(std::move(jsEngineParams));
webRequest = std::make_shared<T>();
jsEngine->SetWebRequest(webRequest);
- jsEngine->SetFileSystem(AdblockPlus::FileSystemPtr(new LazyFileSystem()));
}
std::shared_ptr<T> webRequest;
+ JsEnginePtr jsEngine;
};
typedef WebRequestTest<MockWebRequest> MockWebRequestTest;
« no previous file with comments | « test/UpdateCheck.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld