Index: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/FilterEngineGenericTest.java |
diff --git a/libadblockplus-android/jni/JniJsValue.h b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/FilterEngineGenericTest.java |
similarity index 55% |
copy from libadblockplus-android/jni/JniJsValue.h |
copy to libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/FilterEngineGenericTest.java |
index f332ea9430e7cb10f55c0eac43ad61500b2c6a86..918848b548cf44e4adf11871964d2792dc292e73 100644 |
--- a/libadblockplus-android/jni/JniJsValue.h |
+++ b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/FilterEngineGenericTest.java |
@@ -15,18 +15,23 @@ |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
-#ifndef JNIJSVALUE_H |
-#define JNIJSVALUE_H |
+package org.adblockplus.libadblockplus.tests; |
-#include <jni.h> |
-#include <AdblockPlus/JsValue.h> |
+import org.adblockplus.libadblockplus.FilterEngine; |
+import org.adblockplus.libadblockplus.LazyWebRequest; |
-jobject NewJniJsValue(JNIEnv* env, const AdblockPlus::JsValuePtr& jsValue, jclass jsValueClass = 0); |
+public abstract class FilterEngineGenericTest extends BaseJsTest { |
-jobject JniJsValueListToArrayList(JNIEnv* env, AdblockPlus::JsValueList& list); |
+ protected FilterEngine filterEngine; |
-AdblockPlus::JsValue* JniGetJsValue(jlong ptr); |
+ @Override |
+ protected void setUp() throws Exception { |
+ super.setUp(); |
-AdblockPlus::JsValuePtr& JniGetJsValuePtr(jlong ptr); |
+ // TODO : use LazyFileSystem impl for file system |
+ jsEngine.setWebRequest(new LazyWebRequest()); |
+ jsEngine.setDefaultLogSystem(); |
-#endif /* JNIJSVALUE_H */ |
+ filterEngine = new FilterEngine(jsEngine); |
+ } |
+} |