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

Issue 29536604: Issue 5556 - Update to use libadblockplus revision hg:566f64c8a2a8 (Closed)

Created:
Sept. 5, 2017, 12:28 p.m. by sergei
Modified:
Sept. 8, 2017, 7:51 p.m.
Reviewers:
diegocarloslima, anton, jens
CC:
Felix Dahlke, René Jeschke
Base URL:
github.com:abby-sergz/libadblockplus-android.git
Visibility:
Public.

Description

This change is mainly to simplify further reviews concerning #5556. - rename BaseJsTest to BaseJsEngineTest and FilterEngineGenericTest to BaseFilterEngineTest for consistency among names of base test fixture classes. In the upcoming review there is going to appear yet one base test class. - add BaseJsEngine.tearDown disposing JsEngine if it's instantiated. - add BaseFilterEngine.tearDown disposing FilterEngine if it's instantiated. In addition it waits for some time in order to reduce the probability of crashing. The crash occurs because asynchronous operations of usually file system accomplish when FilterEngine and JsEngine are already destroyed. It won't be needed after finishing #5179 in libadblockplus and following updating of libadblockplus in libadblockplus-android. However, if one gets rid of race conditions in tests (see a lot of sleeps) by implementing asynchronous interfaces for tests with managed execution of operations, as it's currently done in libadblockplus, then that sleep will may go away as well. - inherit from BaseFilterEngineTest if a test needs FilterEngine. It's not only to don't forget about disposing of corresponding classes and to describe that a test uses FilterEngine but it's also a step towards future changes (concerning above described race conditions) because fixture BaseFilterEngine will contain helpers and provide with additional structures. - don't inherit from BaseJsEngineTest nor BaseFilterEngineTest when there is no necessity in it. # depends on https://codereview.adblockplus.org/29536601/ COLLABORATOR=anton@adblockplus.org

Patch Set 1 #

Total comments: 7

Patch Set 2 : address comment #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -146 lines) Patch
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestResourceWrapperTest.java View 2 chunks +1 line, -2 lines 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java View 1 3 chunks +5 lines, -7 lines 2 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AppInfoJsObjectTest.java View 1 chunk +1 line, -1 line 0 comments Download
A + libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseFilterEngineTest.java View 2 chunks +18 lines, -1 line 0 comments Download
A + libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsEngineTest.java View 2 chunks +11 lines, -1 line 0 comments Download
D libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java View 1 chunk +0 lines, -59 lines 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/ConsoleJsObjectTest.java View 1 chunk +1 line, -1 line 0 comments Download
D libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/FilterEngineGenericTest.java View 1 chunk +0 lines, -40 lines 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/FilterEngineTest.java View 1 chunk +1 line, -1 line 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/GlobalJsObjectTest.java View 1 chunk +1 line, -1 line 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/IsAllowedConnectionCallbackImplTest.java View 2 chunks +2 lines, -1 line 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/IsAllowedConnectionCallbackTest.java View 3 chunks +5 lines, -4 lines 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/JsEngineTest.java View 1 chunk +1 line, -1 line 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/JsTest.java View 1 chunk +1 line, -1 line 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/MockWebRequestTest.java View 1 chunk +1 line, -1 line 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/NotificationTest.java View 2 chunks +1 line, -11 lines 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/UpdateCheckTest.java View 3 chunks +7 lines, -7 lines 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/UpdaterTest.java View 2 chunks +3 lines, -5 lines 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/UtilsTest.java View 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 8
sergei
Sept. 5, 2017, 12:57 p.m. (2017-09-05 12:57:26 UTC) #1
anton
https://codereview.adblockplus.org/29536604/diff/29536605/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java File libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java (right): https://codereview.adblockplus.org/29536604/diff/29536605/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java#newcode84 libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java:84: jsEngine.evaluate( is creating FilterEngine instance not required anymore? if ...
Sept. 6, 2017, 6:33 a.m. (2017-09-06 06:33:48 UTC) #2
sergei
JIC, I have extracted these change from the final change in order to simplify the ...
Sept. 7, 2017, 10:33 a.m. (2017-09-07 10:33:31 UTC) #3
anton
https://codereview.adblockplus.org/29536604/diff/29536605/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java File libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java (right): https://codereview.adblockplus.org/29536604/diff/29536605/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java#newcode84 libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java:84: jsEngine.evaluate( On 2017/09/07 10:33:31, sergei wrote: > On 2017/09/06 ...
Sept. 7, 2017, 11:51 a.m. (2017-09-07 11:51:13 UTC) #4
anton
On 2017/09/07 11:51:13, anton wrote: > https://codereview.adblockplus.org/29536604/diff/29536605/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java > File > libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java > (right): > > ...
Sept. 7, 2017, 11:51 a.m. (2017-09-07 11:51:53 UTC) #5
sergei
https://codereview.adblockplus.org/29536604/diff/29538616/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java File libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java (right): https://codereview.adblockplus.org/29536604/diff/29538616/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java#newcode34 libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java:34: // FilterEngine. As discussed in IRC, it's not removed, ...
Sept. 7, 2017, 12:55 p.m. (2017-09-07 12:55:54 UTC) #6
anton
https://codereview.adblockplus.org/29536604/diff/29538616/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java File libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java (right): https://codereview.adblockplus.org/29536604/diff/29538616/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java#newcode34 libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java:34: // FilterEngine. On 2017/09/07 12:55:54, sergei wrote: > As ...
Sept. 7, 2017, 12:57 p.m. (2017-09-07 12:57:48 UTC) #7
diegocarloslima
Sept. 8, 2017, 12:04 p.m. (2017-09-08 12:04:14 UTC) #8
On 2017/09/07 12:57:48, anton wrote:
>
https://codereview.adblockplus.org/29536604/diff/29538616/libadblockplus-andr...
> File
>
libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java
> (right):
> 
>
https://codereview.adblockplus.org/29536604/diff/29538616/libadblockplus-andr...
>
libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java:34:
> // FilterEngine.
> On 2017/09/07 12:55:54, sergei wrote:
> > As discussed in IRC, it's not removed, it's changed.
> 
> LGTM

LGTM

Powered by Google App Engine
This is Rietveld