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 937ccfad4ab19ec500f3881a1b5fdc981a86e42b..544fcb741ad70fafab905f8f2b04a6de673ecda8 100644 |
--- a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java |
+++ b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java |
@@ -22,9 +22,10 @@ import org.adblockplus.libadblockplus.JsEngine; |
import org.adblockplus.libadblockplus.LazyLogSystem; |
import org.adblockplus.libadblockplus.ThrowingWebRequest; |
-import android.test.AndroidTestCase; |
+import android.content.Context; |
+import android.test.InstrumentationTestCase; |
-public abstract class BaseJsTest extends AndroidTestCase |
+public abstract class BaseJsTest extends InstrumentationTestCase |
{ |
protected JsEngine jsEngine; |
@@ -38,4 +39,9 @@ public abstract class BaseJsTest extends AndroidTestCase |
jsEngine.setDefaultFileSystem(getContext().getFilesDir().getAbsolutePath()); |
jsEngine.setWebRequest(new ThrowingWebRequest()); |
} |
+ |
+ protected Context getContext() |
+ { |
+ return getInstrumentation().getTargetContext(); |
+ } |
} |