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

Unified Diff: test/filterListener.js

Issue 29946572: Issue 7094 - Keep subscription filters by text only (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Rebase Created Feb. 16, 2019, 3:10 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
« no previous file with comments | « lib/synchronizer.js ('k') | test/filterStorage.js » ('j') | 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
@@ -219,23 +219,23 @@
checkKnownFilters(test, "add subscription with filter1, @@filter2, ##filter3, !filter4, #@#filter5, example.com#?#:-abp-properties(filter6), example.com#@#[-abp-properties='filter7']", {blacklist: [filter1.text], elemhide: [filter3.text], elemhideexception: [filter5.text, filter7.text], elemhideemulation: [filter6.text]});
filter2.disabled = false;
checkKnownFilters(test, "enable @@filter2", {blacklist: [filter1.text], whitelist: [filter2.text], elemhide: [filter3.text], elemhideexception: [filter5.text, filter7.text], elemhideemulation: [filter6.text]});
filterStorage.addFilter(filter1);
checkKnownFilters(test, "add filter1", {blacklist: [filter1.text], whitelist: [filter2.text], elemhide: [filter3.text], elemhideexception: [filter5.text, filter7.text], elemhideemulation: [filter6.text]});
- filterStorage.updateSubscriptionFilters(subscription, [filter4]);
+ filterStorage.updateSubscriptionFilters(subscription, [filter4.text]);
checkKnownFilters(test, "change subscription filters to filter4", {blacklist: [filter1.text]});
filterStorage.removeFilter(filter1);
checkKnownFilters(test, "remove filter1", {});
- filterStorage.updateSubscriptionFilters(subscription, [filter1, filter2]);
+ filterStorage.updateSubscriptionFilters(subscription, [filter1.text, filter2.text]);
checkKnownFilters(test, "change subscription filters to filter1, filter2", {blacklist: [filter1.text], whitelist: [filter2.text]});
filter1.disabled = true;
checkKnownFilters(test, "disable filter1", {whitelist: [filter2.text]});
filter2.disabled = true;
checkKnownFilters(test, "disable filter2", {});
filter1.disabled = false;
filter2.disabled = false;
@@ -315,23 +315,23 @@
filterStorage.removeFilter(filter2);
filterStorage.addFilter(filter2);
checkKnownFilters(test, "re-add @@filter2", {blacklist: [filter1.text], whitelist: [filter2.text]});
test.equal(filter2.subscriptionCount, 1, "@@filter2.subscriptionCount");
test.ok([...filter2.subscriptions()][0] == subscription3, "@@filter2 added to the default exceptions group");
let subscription4 = Subscription.fromURL("http://test/");
- filterStorage.updateSubscriptionFilters(subscription4, [filter3, filter4, filter5]);
+ filterStorage.updateSubscriptionFilters(subscription4, [filter3.text, filter4.text, filter5.text]);
checkKnownFilters(test, "update subscription not in the list yet", {blacklist: [filter1.text], whitelist: [filter2.text]});
filterStorage.addSubscription(subscription4);
checkKnownFilters(test, "add subscription to the list", {blacklist: [filter1.text, filter3.text], whitelist: [filter2.text, filter4.text]});
- filterStorage.updateSubscriptionFilters(subscription4, [filter3, filter2, filter5]);
+ filterStorage.updateSubscriptionFilters(subscription4, [filter3.text, filter2.text, filter5.text]);
checkKnownFilters(test, "update subscription while in the list", {blacklist: [filter1.text, filter3.text], whitelist: [filter2.text]});
subscription3.disabled = true;
checkKnownFilters(test, "disable exception rules", {blacklist: [filter1.text, filter3.text], whitelist: [filter2.text]});
filterStorage.removeSubscription(subscription4);
checkKnownFilters(test, "remove subscription from the list", {blacklist: [filter1.text]});
« no previous file with comments | « lib/synchronizer.js ('k') | test/filterStorage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld