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

Delta Between Two Patch Sets: 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
Left Patch Set: Created Aug. 23, 2017, 11:49 a.m.
Right Patch Set: address comments Created Aug. 24, 2017, 1:38 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/ConsoleJsObjectTest.java » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 22 matching lines...) Expand all
33 @Override 33 @Override
34 protected void setUp() throws Exception 34 protected void setUp() throws Exception
35 { 35 {
36 super.setUp(); 36 super.setUp();
37 37
38 jsEngine = new JsEngine(AppInfo.builder().build(), createLogSystem()); 38 jsEngine = new JsEngine(AppInfo.builder().build(), createLogSystem());
39 jsEngine.setDefaultFileSystem(getContext().getFilesDir().getAbsolutePath()); 39 jsEngine.setDefaultFileSystem(getContext().getFilesDir().getAbsolutePath());
40 jsEngine.setWebRequest(new ThrowingWebRequest()); 40 jsEngine.setWebRequest(new ThrowingWebRequest());
41 } 41 }
42 42
43 // If the method returns null then a default implementation of the Log System
44 // provided by libadblockplus is used.
43 protected LogSystem createLogSystem() 45 protected LogSystem createLogSystem()
44 { 46 {
45 return null; 47 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.
46 } 48 }
47 49
48 protected Context getContext() 50 protected Context getContext()
49 { 51 {
50 return getInstrumentation().getTargetContext(); 52 return getInstrumentation().getTargetContext();
51 } 53 }
52 } 54 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld