Index: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java |
diff --git a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java |
index 7ef360ad41c94c08602c408048914b1fd3363961..86a5e5328f02d01ba5b13d9229963a557754dd28 100644 |
--- a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java |
+++ b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java |
@@ -20,6 +20,7 @@ package org.adblockplus.libadblockplus.tests; |
import org.adblockplus.libadblockplus.AppInfo; |
import org.adblockplus.libadblockplus.JsEngine; |
import org.adblockplus.libadblockplus.LazyLogSystem; |
+import org.adblockplus.libadblockplus.LogSystem; |
import org.adblockplus.libadblockplus.ThrowingWebRequest; |
import android.content.Context; |
@@ -34,12 +35,18 @@ public abstract class BaseJsTest extends InstrumentationTestCase |
{ |
super.setUp(); |
- jsEngine = new JsEngine(AppInfo.builder().build()); |
- jsEngine.setDefaultLogSystem(); |
+ jsEngine = new JsEngine(AppInfo.builder().build(), createLogSystem()); |
jsEngine.setDefaultFileSystem(getContext().getFilesDir().getAbsolutePath()); |
jsEngine.setWebRequest(new ThrowingWebRequest()); |
} |
+ // If the method returns null then a default implementation of the Log System |
+ // provided by libadblockplus is used. |
+ protected LogSystem createLogSystem() |
+ { |
+ return null; |
+ } |
+ |
protected Context getContext() |
{ |
return getInstrumentation().getTargetContext(); |