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

Side by Side Diff: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestResourceWrapperTest.java

Issue 29536604: Issue 5556 - Update to use libadblockplus revision hg:566f64c8a2a8 (Closed) Base URL: github.com:abby-sergz/libadblockplus-android.git
Patch Set: Created Sept. 5, 2017, 12:28 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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 19 matching lines...) Expand all
30 import org.junit.Test; 30 import org.junit.Test;
31 31
32 import java.util.Collection; 32 import java.util.Collection;
33 import java.util.HashMap; 33 import java.util.HashMap;
34 import java.util.HashSet; 34 import java.util.HashSet;
35 import java.util.LinkedList; 35 import java.util.LinkedList;
36 import java.util.List; 36 import java.util.List;
37 import java.util.Map; 37 import java.util.Map;
38 import java.util.Set; 38 import java.util.Set;
39 39
40 public class AndroidWebRequestResourceWrapperTest extends FilterEngineGenericTes t 40 public class AndroidWebRequestResourceWrapperTest extends BaseFilterEngineTest
41 { 41 {
42 private static final int UPDATE_SUBSCRIPTIONS_WAIT_DELAY_MS = 5 * 1000; // 5s 42 private static final int UPDATE_SUBSCRIPTIONS_WAIT_DELAY_MS = 5 * 1000; // 5s
43 43
44 private static final class TestRequest extends AndroidWebRequest 44 private static final class TestRequest extends AndroidWebRequest
45 { 45 {
46 private List<String> urls = new LinkedList<String>(); 46 private List<String> urls = new LinkedList<String>();
47 47
48 public List<String> getUrls() 48 public List<String> getUrls()
49 { 49 {
50 return urls; 50 return urls;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 private TestRequest request; 100 private TestRequest request;
101 private Map<String, Integer> preloadMap; 101 private Map<String, Integer> preloadMap;
102 private TestStorage storage; 102 private TestStorage storage;
103 private AndroidWebRequestResourceWrapper wrapper; 103 private AndroidWebRequestResourceWrapper wrapper;
104 private TestWrapperListener wrapperListener; 104 private TestWrapperListener wrapperListener;
105 105
106 @Override 106 @Override
107 protected void setUp() throws Exception 107 protected void setUp() throws Exception
108 { 108 {
109
110 request = new TestRequest(); 109 request = new TestRequest();
111 preloadMap = new HashMap<String, Integer>(); 110 preloadMap = new HashMap<String, Integer>();
112 storage = new TestStorage(); 111 storage = new TestStorage();
113 wrapper = new AndroidWebRequestResourceWrapper( 112 wrapper = new AndroidWebRequestResourceWrapper(
114 getInstrumentation().getContext(), request, preloadMap, storage); 113 getInstrumentation().getContext(), request, preloadMap, storage);
115 wrapperListener = new TestWrapperListener(); 114 wrapperListener = new TestWrapperListener();
116 wrapper.setListener(wrapperListener); 115 wrapper.setListener(wrapperListener);
117 116
118 super.setUp(); 117 super.setUp();
119 } 118 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 328 }
330 329
331 @Test 330 @Test
332 public void testNotIntercepted_AcceptableAds() 331 public void testNotIntercepted_AcceptableAds()
333 { 332 {
334 testNotIntercepted( 333 testNotIntercepted(
335 AndroidWebRequestResourceWrapper.EASYLIST, R.raw.easylist, 334 AndroidWebRequestResourceWrapper.EASYLIST, R.raw.easylist,
336 AndroidWebRequestResourceWrapper.ACCEPTABLE_ADS); 335 AndroidWebRequestResourceWrapper.ACCEPTABLE_ADS);
337 } 336 }
338 } 337 }
OLDNEW

Powered by Google App Engine
This is Rietveld