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

Unified Diff: test/BaseJsTest.h

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/BaseJsTest.h
diff --git a/test/BaseJsTest.h b/test/BaseJsTest.h
index ddc28a4fe974dcda3b435116d4c886c7bd4b1ad8..54c47a240d9097e4d40928424159e3fb1b8a870a 100644
--- a/test/BaseJsTest.h
+++ b/test/BaseJsTest.h
@@ -21,6 +21,7 @@
#include <thread>
#include <AdblockPlus.h>
+#include <AdblockPlus/Platform.h>
#include <gtest/gtest.h>
#include "../src/Thread.h"
@@ -256,27 +257,19 @@ public:
}
};
-struct JsEngineCreationParameters
+struct ThrowingPlatformCreationParameters: AdblockPlus::Platform::CreationParameters
{
- JsEngineCreationParameters();
-
- AdblockPlus::AppInfo appInfo;
- AdblockPlus::LogSystemPtr logSystem;
- AdblockPlus::TimerPtr timer;
- AdblockPlus::WebRequestPtr webRequest;
- AdblockPlus::FileSystemPtr fileSystem;
+ ThrowingPlatformCreationParameters();
};
-AdblockPlus::JsEnginePtr CreateJsEngine(JsEngineCreationParameters&& jsEngineCreationParameters = JsEngineCreationParameters());
-
class BaseJsTest : public ::testing::Test
{
protected:
- AdblockPlus::JsEnginePtr jsEngine;
+ std::unique_ptr<AdblockPlus::Platform> platform;
virtual void SetUp()
{
- jsEngine = CreateJsEngine();
+ platform.reset(new AdblockPlus::Platform(ThrowingPlatformCreationParameters()));
}
};

Powered by Google App Engine
This is Rietveld