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

Unified Diff: test/filterStorage.js

Issue 29453590: Issue 5287 - Change syntax for element hiding emulation filters and remove simplified element hidin… (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created June 1, 2017, 12:01 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
« test/filterClasses.js ('K') | « test/filterListener.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/filterStorage.js
===================================================================
--- a/test/filterStorage.js
+++ b/test/filterStorage.js
@@ -235,50 +235,50 @@ exports.testAddingFilters = function(tes
test.deepEqual(changes, ["filter.added foo"], "Received changes");
changes = [];
FilterStorage.addFilter(Filter.fromText("@@bar"));
compareFiltersList(test, "Adding exception rule", [["foo"], ["@@bar"], []]);
test.deepEqual(changes, ["filter.added @@bar"], "Received changes");
changes = [];
- FilterStorage.addFilter(Filter.fromText("foo#bar"));
- compareFiltersList(test, "Adding hiding rule", [["foo"], ["@@bar", "foo#bar"], []]);
- test.deepEqual(changes, ["filter.added foo#bar"], "Received changes");
+ FilterStorage.addFilter(Filter.fromText("foo##bar"));
+ compareFiltersList(test, "Adding hiding rule", [["foo"], ["@@bar", "foo##bar"], []]);
+ test.deepEqual(changes, ["filter.added foo##bar"], "Received changes");
changes = [];
FilterStorage.addFilter(Filter.fromText("foo#@#bar"));
- compareFiltersList(test, "Adding hiding exception", [["foo"], ["@@bar", "foo#bar", "foo#@#bar"], []]);
+ compareFiltersList(test, "Adding hiding exception", [["foo"], ["@@bar", "foo##bar", "foo#@#bar"], []]);
test.deepEqual(changes, ["filter.added foo#@#bar"], "Received changes");
changes = [];
FilterStorage.addFilter(Filter.fromText("!foobar"));
- compareFiltersList(test, "Adding comment", [["foo"], ["@@bar", "foo#bar", "foo#@#bar"], ["!foobar"]]);
+ compareFiltersList(test, "Adding comment", [["foo"], ["@@bar", "foo##bar", "foo#@#bar"], ["!foobar"]]);
test.deepEqual(changes, ["filter.added !foobar"], "Received changes");
changes = [];
FilterStorage.addFilter(Filter.fromText("foo"));
- compareFiltersList(test, "Adding already added filter", [["foo"], ["@@bar", "foo#bar", "foo#@#bar"], ["!foobar"]]);
+ compareFiltersList(test, "Adding already added filter", [["foo"], ["@@bar", "foo##bar", "foo#@#bar"], ["!foobar"]]);
test.deepEqual(changes, [], "Received changes");
subscription1.disabled = true;
changes = [];
FilterStorage.addFilter(Filter.fromText("foo"));
- compareFiltersList(test, "Adding filter already in a disabled subscription", [["foo"], ["@@bar", "foo#bar", "foo#@#bar"], ["!foobar", "foo"]]);
+ compareFiltersList(test, "Adding filter already in a disabled subscription", [["foo"], ["@@bar", "foo##bar", "foo#@#bar"], ["!foobar", "foo"]]);
test.deepEqual(changes, ["filter.added foo"], "Received changes");
changes = [];
FilterStorage.addFilter(Filter.fromText("foo"), subscription1);
- compareFiltersList(test, "Adding filter to an explicit subscription", [["foo", "foo"], ["@@bar", "foo#bar", "foo#@#bar"], ["!foobar", "foo"]]);
+ compareFiltersList(test, "Adding filter to an explicit subscription", [["foo", "foo"], ["@@bar", "foo##bar", "foo#@#bar"], ["!foobar", "foo"]]);
test.deepEqual(changes, ["filter.added foo"], "Received changes");
changes = [];
FilterStorage.addFilter(Filter.fromText("!foobar"), subscription2, 0);
- compareFiltersList(test, "Adding filter to an explicit subscription with position", [["foo", "foo"], ["!foobar", "@@bar", "foo#bar", "foo#@#bar"], ["!foobar", "foo"]]);
+ compareFiltersList(test, "Adding filter to an explicit subscription with position", [["foo", "foo"], ["!foobar", "@@bar", "foo##bar", "foo#@#bar"], ["!foobar", "foo"]]);
test.deepEqual(changes, ["filter.added !foobar"], "Received changes");
test.done();
};
exports.testRemovingFilters = function(test)
{
let subscription1 = Subscription.fromURL("~foo");
« test/filterClasses.js ('K') | « test/filterListener.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld