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: Created Aug. 23, 2017, 11:49 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 7ef360ad41c94c08602c408048914b1fd3363961..2eb6a18b4d03ed1d5c7a7d1cf3b87d66d9dd2f42 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,16 @@ public abstract class BaseJsTest extends InstrumentationTestCase
{
super.setUp();
- jsEngine = new JsEngine(AppInfo.builder().build());
- jsEngine.setDefaultLogSystem();
anton 2017/08/24 11:23:44 as far as i can see passing `null` as log system m
sergei 2017/08/24 11:38:26 Right now default log system is created by JsEngin
+ jsEngine = new JsEngine(AppInfo.builder().build(), createLogSystem());
jsEngine.setDefaultFileSystem(getContext().getFilesDir().getAbsolutePath());
jsEngine.setWebRequest(new ThrowingWebRequest());
}
+ protected LogSystem createLogSystem()
+ {
+ return null;
anton 2017/08/24 11:12:50 comment like "returning null log system make JsEng
sergei 2017/08/24 13:39:10 Done.
+ }
+
protected Context getContext()
{
return getInstrumentation().getTargetContext();

Powered by Google App Engine
This is Rietveld