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

Unified Diff: test/filterClasses.js

Issue 29574665: Issue 5159 - Expose collapse property for BlockingFilter (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Added test for collapse Created Oct. 13, 2017, 3:40 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
« compiled/filter/RegExpFilter.cpp ('K') | « compiled/filter/RegExpFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/filterClasses.js
===================================================================
--- a/test/filterClasses.js
+++ b/test/filterClasses.js
@@ -230,27 +230,29 @@
test.done();
};
exports.testSerialize = function(test)
{
// Comment
let filter = Filter.fromText("! serialize");
test.equal(filter.serialize(), "[Filter]\ntext=! serialize\n");
+ test.equal(filter.collapse, undefined);
filter.delete();
// Blocking filter
filter = Filter.fromText("serialize");
test.equal(filter.serialize(), "[Filter]\ntext=serialize\n");
filter.disabled = true;
test.equal(filter.serialize(), "[Filter]\ntext=serialize\ndisabled=true\n");
filter.disabled = false;
filter.hitCount = 10;
filter.lastHit = 12;
test.equal(filter.serialize(), "[Filter]\ntext=serialize\nhitCount=10\nlastHit=12\n");
+ test.ok(filter.collapse);
filter.delete();
// Invalid filter
filter = Filter.fromText("serialize$foobar");
test.equal(filter.serialize(), "[Filter]\ntext=serialize$foobar\n");
filter.delete();
// Element hiding filter
« compiled/filter/RegExpFilter.cpp ('K') | « compiled/filter/RegExpFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld