|
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
Total comments: 7
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
|
Total messages: 8
|