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

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

Issue 29536604: Issue 5556 - Update to use libadblockplus revision hg:566f64c8a2a8 (Closed) Base URL: github.com:abby-sergz/libadblockplus-android.git
Patch Set: address comment Created Sept. 7, 2017, 12:54 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
Index: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java
diff --git a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java
index b968565effe1a04de4d8d3eefefd1fd40533965c..02060dbbe9d355dea2a70012a48312cc10141036 100644
--- a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java
+++ b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java
@@ -28,7 +28,11 @@ import org.junit.Test;
import java.net.MalformedURLException;
import java.util.List;
-public class AndroidWebRequestTest extends BaseJsTest
+// It inherits the fixture instantiating FilterEngine which is not explicitly
+// used in the test bodies in order to provide with JS XMLHttpRequest class
+// which is defined in compat.js, but the latter is properly loaded by
+// FilterEngine.
sergei 2017/09/07 12:55:54 As discussed in IRC, it's not removed, it's change
anton 2017/09/07 12:57:48 LGTM
+public class AndroidWebRequestTest extends BaseFilterEngineTest
{
@Override
protected WebRequest createWebRequest()
@@ -79,10 +83,6 @@ public class AndroidWebRequestTest extends BaseJsTest
@Test
public void testXMLHttpRequest()
{
- // creating not used anywhere FilterEngine object is not as useless as it seems:
- // it loads compat.js JsEngine to add XMLHttpRequest class support
- new FilterEngine(jsEngine);
-
jsEngine.evaluate(
"var result;\n" +
"var request = new XMLHttpRequest();\n" +
@@ -121,8 +121,6 @@ public class AndroidWebRequestTest extends BaseJsTest
@Test
public void testGetElemhideElements() throws MalformedURLException, InterruptedException
{
- FilterEngine filterEngine = new FilterEngine(jsEngine);
-
Thread.sleep(20 * 1000); // wait for the subscription to be downloaded
final String url = "www.mobile01.com/somepage.html";

Powered by Google App Engine
This is Rietveld