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

Unified Diff: test/Notification.cpp

Issue 29500602: Issue 5450 - introduce the Platform class (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: rebase Created July 31, 2017, 12:53 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
Index: test/Notification.cpp
diff --git a/test/Notification.cpp b/test/Notification.cpp
index b5f487080ad409d5b0da8ca268c804ec958710a3..8217cf7297ea76808dc793675b4527e84dbec8aa 100644
--- a/test/Notification.cpp
+++ b/test/Notification.cpp
@@ -30,17 +30,17 @@ namespace
class NotificationTest : public ::testing::Test
{
protected:
+ std::unique_ptr<Platform> platform;
FilterEnginePtr filterEngine;
void SetUp()
{
LazyFileSystem* fileSystem;
- JsEngineCreationParameters jsEngineParams;
- jsEngineParams.fileSystem.reset(fileSystem = new LazyFileSystem());
- jsEngineParams.logSystem.reset(new DefaultLogSystem());
- jsEngineParams.timer.reset(new NoopTimer());
- jsEngineParams.webRequest.reset(new NoopWebRequest());
- auto jsEngine = CreateJsEngine(std::move(jsEngineParams));
- filterEngine = CreateFilterEngine(*fileSystem, jsEngine);
+ ThrowingPlatformCreationParameters platformParams;
+ platformParams.timer.reset(new NoopTimer());
+ platformParams.fileSystem.reset(fileSystem = new LazyFileSystem());
+ platformParams.webRequest.reset(new NoopWebRequest());
+ platform.reset(new Platform(std::move(platformParams)));
+ filterEngine = CreateFilterEngine(*fileSystem, platform->GetJsEngine());
}
void AddNotification(const std::string& notification)
« include/AdblockPlus/Platform.h ('K') | « test/JsValue.cpp ('k') | test/Prefs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld