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

Unified Diff: test/WebRequest.cpp

Issue 29500602: Issue 5450 - introduce the Platform class (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created July 28, 2017, 12:40 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
« include/AdblockPlus/JsEngine.h ('K') | « 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 4d54be47a69d1e3c1a1b2a955cb5bf30d1679c59..fb51e884796fbe86a0c13b59255ac8a98025e90a 100644
--- a/test/WebRequest.cpp
+++ b/test/WebRequest.cpp
@@ -30,12 +30,13 @@ namespace
protected:
void SetUp()
{
- JsEngineCreationParameters jsEngineParams;
- jsEngineParams.logSystem = CreateLogSystem();
- jsEngineParams.timer.reset(new NoopTimer());
- jsEngineParams.fileSystem.reset(fileSystem = new LazyFileSystem());
- jsEngineParams.webRequest = CreateWebRequest();
- jsEngine = CreateJsEngine(std::move(jsEngineParams));
+ ThrowingPlatformCreationParameters platformParams;
+ platformParams.logSystem = CreateLogSystem();
+ platformParams.timer.reset(new NoopTimer());
+ platformParams.fileSystem.reset(fileSystem = new LazyFileSystem());
+ platformParams.webRequest = CreateWebRequest();
+ platform.reset(new Platform(std::move(platformParams)));
+ jsEngine = platform->GetJsEngine();
}
virtual WebRequestPtr CreateWebRequest() = 0;
@@ -45,6 +46,7 @@ namespace
return LogSystemPtr(new ThrowingLogSystem());
}
+ std::unique_ptr<Platform> platform;
JsEnginePtr jsEngine;
LazyFileSystem* fileSystem;
};
« include/AdblockPlus/JsEngine.h ('K') | « test/UpdateCheck.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld