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

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

Issue 29524565: Issue 5556 - remove LogSystem setters (Closed) Base URL: github.com:abby-sergz/libadblockplus-android.git
Patch Set: address comments Created Aug. 24, 2017, 1:38 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
« no previous file with comments | « no previous file | libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/ConsoleJsObjectTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7ef360ad41c94c08602c408048914b1fd3363961..86a5e5328f02d01ba5b13d9229963a557754dd28 100644
--- a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java
+++ b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java
@@ -20,6 +20,7 @@ package org.adblockplus.libadblockplus.tests;
import org.adblockplus.libadblockplus.AppInfo;
import org.adblockplus.libadblockplus.JsEngine;
import org.adblockplus.libadblockplus.LazyLogSystem;
+import org.adblockplus.libadblockplus.LogSystem;
import org.adblockplus.libadblockplus.ThrowingWebRequest;
import android.content.Context;
@@ -34,12 +35,18 @@ public abstract class BaseJsTest extends InstrumentationTestCase
{
super.setUp();
- jsEngine = new JsEngine(AppInfo.builder().build());
- jsEngine.setDefaultLogSystem();
+ jsEngine = new JsEngine(AppInfo.builder().build(), createLogSystem());
jsEngine.setDefaultFileSystem(getContext().getFilesDir().getAbsolutePath());
jsEngine.setWebRequest(new ThrowingWebRequest());
}
+ // If the method returns null then a default implementation of the Log System
+ // provided by libadblockplus is used.
+ protected LogSystem createLogSystem()
+ {
+ return null;
+ }
+
protected Context getContext()
{
return getInstrumentation().getTargetContext();
« no previous file with comments | « no previous file | libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/ConsoleJsObjectTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld