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

Unified Diff: test/filterListener.js

Issue 29889555: Issue 6975 - Check for specific anti-circumvention subscription URL (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Sept. 23, 2018, 11:36 a.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
« no previous file with comments | « lib/filterListener.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/filterListener.js
===================================================================
--- a/test/filterListener.js
+++ b/test/filterListener.js
@@ -330,16 +330,17 @@
test.done();
};
exports.testSnippetFilters = function(test)
{
let filter1 = Filter.fromText("example.com#$#filter1");
let filter2 = Filter.fromText("example.com#$#filter2");
+ let filter3 = Filter.fromText("example.com#$#filter3");
let subscription1 = Subscription.fromURL("http://test1/");
subscription1.filters = [filter1, filter2];
FilterStorage.addSubscription(subscription1);
checkKnownFilters(test, "add subscription with filter1 and filter2", {});
let subscription2 = Subscription.fromURL("http://test2/");
@@ -350,10 +351,16 @@
checkKnownFilters(test, "add subscription of type circumvention with filter1", {snippets: [filter1.text]});
let subscription3 = Subscription.fromURL("~foo");
subscription3.filters = [filter2];
FilterStorage.addSubscription(subscription3);
checkKnownFilters(test, "add special subscription with filter2", {snippets: [filter1.text, filter2.text]});
+ let subscription4 = Subscription.fromURL("https://easylist-downloads.adblockplus.org/abp-filters-anti-cv.txt");
+ subscription4.filters = [filter3];
+
+ FilterStorage.addSubscription(subscription4);
+ checkKnownFilters(test, "add ABP anti-circumvention subscription with filter3", {snippets: [filter1.text, filter2.text, filter3.text]});
+
test.done();
};
« no previous file with comments | « lib/filterListener.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld