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 c8c66f67396a8a5321b7755068748df226ae1c0d..289110e8c205d7101e81f2d4fdc6a1528b4aa66c 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(); |
+ } |
} |