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

Unified Diff: test/filterClasses.js

Issue 29746563: Noissue - Trim spaces around element hiding emulation selectors (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Add tests Created April 10, 2018, 12:58 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/filterClasses.js ('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
@@ -426,16 +426,24 @@
// Comment filters
test.equal(Filter.normalize(" ! fo o## bar "),
"! fo o## bar");
// Element hiding filters
test.equal(Filter.normalize(" domain.c om## # sele ctor "),
"domain.com### sele ctor");
+ // Element hiding emulation filters
+ test.equal(Filter.normalize(" domain.c om#?# # sele ctor "),
kzar 2018/04/11 11:29:49 What about a test for something like "domain.com#
Manish Jethani 2018/04/11 11:50:19 Interesting, the test would pass for "# ?#" but no
kzar 2018/04/11 12:04:09 Well it's good that we're being consistent now, bu
Manish Jethani 2018/04/11 17:34:54 OK, I thought about this a little bit. elemhideReg
+ "domain.com#?## sele ctor");
+
+ // Element hiding exception filters
+ test.equal(Filter.normalize(" domain.c om#@# # sele ctor "),
+ "domain.com#@## sele ctor");
+
// Regular filters
let normalized = Filter.normalize(
" b$l a$sitekey= foo ,domain= do main.com |foo .com,c sp= c s p "
);
test.equal(
normalized,
"b$la$sitekey=foo,domain=domain.com|foo.com,csp=c s p"
);
« no previous file with comments | « lib/filterClasses.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld