Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
418 List<Subscription> listedSubscriptions = filterEngine.getListedSubscriptions (); | 418 List<Subscription> listedSubscriptions = filterEngine.getListedSubscriptions (); |
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 | |
429 @Test | |
430 public void testIsAcceptableAdsIfDisabled() | |
431 { | |
432 if (filterEngine.isAcceptableAdsEnabled()) | |
433 { | |
434 filterEngine.setAcceptableAdsEnabled(false); | |
435 } | |
436 assertFalse(filterEngine.isAcceptableAdsEnabled()); | |
437 | |
438 List<Subscription> listedSubscriptions = filterEngine.getListedSubscriptions (); | |
439 for (Subscription eachSubscription : listedSubscriptions) | |
440 { | |
441 if (eachSubscription.isAcceptableAds()) | |
442 { | |
443 fail("AA subscription found in listed subscriptions when disabled"); | |
anton
2017/04/07 07:08:17
for some reason the test fails for now
sergei
2017/04/07 08:01:22
You need to also check whether it's disabled. The
anton
2017/04/07 08:06:49
there is (and there were) no 'disabled' property i
sergei
2017/04/07 09:51:03
Actually it's a good point, I think we need either
| |
444 } | |
445 } | |
446 } | |
447 } | 428 } |
LEFT | RIGHT |