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

Unified Diff: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/FilterEngineGenericTest.java

Issue 29344967: Issue 4031 - Implement tests for libadblockplus-android (Closed)
Patch Set: Updated tests, also moved to libadblockplus-android repo Created June 21, 2016, 10:51 a.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: 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);
+ }
+}

Powered by Google App Engine
This is Rietveld