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 86a5e5328f02d01ba5b13d9229963a557754dd28..e0283f33a80f4fc416183a526200cf1e165f854b 100644 |
--- a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java |
+++ b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java |
@@ -22,6 +22,7 @@ import org.adblockplus.libadblockplus.JsEngine; |
import org.adblockplus.libadblockplus.LazyLogSystem; |
import org.adblockplus.libadblockplus.LogSystem; |
import org.adblockplus.libadblockplus.ThrowingWebRequest; |
+import org.adblockplus.libadblockplus.WebRequest; |
import android.content.Context; |
import android.test.InstrumentationTestCase; |
@@ -35,9 +36,8 @@ public abstract class BaseJsTest extends InstrumentationTestCase |
{ |
super.setUp(); |
- jsEngine = new JsEngine(AppInfo.builder().build(), createLogSystem()); |
+ jsEngine = new JsEngine(AppInfo.builder().build(), createLogSystem(), createWebRequest()); |
jsEngine.setDefaultFileSystem(getContext().getFilesDir().getAbsolutePath()); |
- jsEngine.setWebRequest(new ThrowingWebRequest()); |
} |
// If the method returns null then a default implementation of the Log System |
@@ -47,6 +47,11 @@ public abstract class BaseJsTest extends InstrumentationTestCase |
return null; |
} |
+ protected WebRequest createWebRequest() |
+ { |
+ return new ThrowingWebRequest(); |
+ } |
+ |
protected Context getContext() |
{ |
return getInstrumentation().getTargetContext(); |