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

Unified Diff: test/BaseJsTest.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
Index: test/BaseJsTest.cpp
diff --git a/test/BaseJsTest.cpp b/test/BaseJsTest.cpp
index e8d2dd3f051feeb7328337b87fb349de94eb7929..a9720545b183141d5fb7b6986fb3d75c0e5c9dcd 100644
--- a/test/BaseJsTest.cpp
+++ b/test/BaseJsTest.cpp
@@ -35,24 +35,6 @@ void DelayedTimer::ProcessImmediateTimers(DelayedTimer::SharedTasks& timerTasks)
}
}
-JsEngineCreationParameters::JsEngineCreationParameters()
- : logSystem(new ThrowingLogSystem())
- , timer(new ThrowingTimer())
- , webRequest(new ThrowingWebRequest())
- , fileSystem(std::make_shared<ThrowingFileSystem>())
-{
-}
-
-AdblockPlus::JsEnginePtr CreateJsEngine(JsEngineCreationParameters&& jsEngineCreationParameters)
-{
- auto jsEngine = AdblockPlus::JsEngine::New(jsEngineCreationParameters.appInfo,
- std::move(jsEngineCreationParameters.timer),
- std::move(jsEngineCreationParameters.fileSystem),
- std::move(jsEngineCreationParameters.webRequest),
- std::move(jsEngineCreationParameters.logSystem));
- return jsEngine;
-}
-
FilterEnginePtr CreateFilterEngine(LazyFileSystem& fileSystem,
const JsEnginePtr& jsEngine,
const FilterEngine::CreationParameters& creationParams)
@@ -75,3 +57,11 @@ FilterEnginePtr CreateFilterEngine(LazyFileSystem& fileSystem,
}
return retValue;
}
+
+ThrowingPlatformCreationParameters::ThrowingPlatformCreationParameters()
+{
+ logSystem.reset(new ThrowingLogSystem());
+ timer.reset(new ThrowingTimer());
+ fileSystem = std::make_shared<ThrowingFileSystem>();
+ webRequest.reset(new ThrowingWebRequest());
+}

Powered by Google App Engine
This is Rietveld