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

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

Issue 29411633: Issue 5136 - Add test for AndroidWebRequestResourceWrapper (Closed)
Patch Set: added "static final" for the test impls Created April 28, 2017, 6:09 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/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();
+ }
}

Powered by Google App Engine
This is Rietveld