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

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

Issue 29435584: Issue 4181 - Fix FilterEngineTest tests (Closed)
Patch Set: Created May 10, 2017, 10:56 a.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-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 "http://example.org/", 319 "http://example.org/",
320 "http://example.com/" 320 "http://example.com/"
321 }); 321 });
322 assertNotNull(match5); 322 assertNotNull(match5);
323 assertEquals(Filter.Type.EXCEPTION, match5.getType()); 323 assertEquals(Filter.Type.EXCEPTION, match5.getType());
324 } 324 }
325 325
326 @Test 326 @Test
327 public void testFirstRunFlag() 327 public void testFirstRunFlag()
328 { 328 {
329 assertFalse(filterEngine.isFirstRun()); 329 assertTrue(filterEngine.isFirstRun());
330 } 330 }
331 331
332 @Test 332 @Test
333 public void testSetRemoveFilterChangeCallback() 333 public void testSetRemoveFilterChangeCallback()
334 { 334 {
335 MockFilterChangeCallback mockFilterChangeCallback = new MockFilterChangeCall back(0); 335 MockFilterChangeCallback mockFilterChangeCallback = new MockFilterChangeCall back(0);
336 336
337 filterEngine.setFilterChangeCallback(mockFilterChangeCallback); 337 filterEngine.setFilterChangeCallback(mockFilterChangeCallback);
338 filterEngine.getFilter("foo").addToList(); 338 filterEngine.getFilter("foo").addToList();
339 assertEquals(1, mockFilterChangeCallback.getTimesCalled()); 339 assertEquals(1, mockFilterChangeCallback.getTimesCalled());
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 for (Subscription eachSubscription : listedSubscriptions) 419 for (Subscription eachSubscription : listedSubscriptions)
420 { 420 {
421 if (eachSubscription.isAcceptableAds()) 421 if (eachSubscription.isAcceptableAds())
422 { 422 {
423 return; 423 return;
424 } 424 }
425 } 425 }
426 fail("AA subscription not found in listed subscriptions when enabled"); 426 fail("AA subscription not found in listed subscriptions when enabled");
427 } 427 }
428 } 428 }
OLDNEW

Powered by Google App Engine
This is Rietveld