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

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

Issue 29413555: Issue 5145 - Add test for IsAllowedConnectionCallbackImpl (Closed)
Patch Set: Created April 15, 2017, 1:55 p.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 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();
+ }
}

Powered by Google App Engine
This is Rietveld