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

Unified Diff: test/filterClasses.js

Issue 29367031: Issue 4684 - Allow { and } in attribute and property selectors (Closed) Base URL: https://bitbucket.org/fhd/adblockpluscore
Patch Set: Created Dec. 9, 2016, 2:07 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
« lib/filterClasses.js ('K') | « 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
@@ -374,8 +374,25 @@
{
let filter = Filter.fromText(filterText);
test.ok(filter instanceof InvalidFilter);
test.equal(filter.reason, "filter_invalid_domain");
}
test.done();
};
+
+exports.testElemHideRulesWithBraces = function(test)
+{
+ compareFilter(test, "###foo{color: red}",
+ ["type=elemhide",
+ "text=###foo{color: red}",
+ "selectorDomain=",
+ "selector=#foo\\x7Bcolor: red\\x7D",
+ "domains="]);
+ compareFilter(test, "foo.com##[-abp-properties='/margin: [3-4]{2}/']",
+ ["type=elemhideemulation",
+ "text=foo.com##[-abp-properties='/margin: [3-4]{2}/']",
+ "selectorDomain=foo.com",
+ "selector=[-abp-properties='/margin: [3-4]\\x7B2\\x7D/']",
+ "domains=FOO.COM"]);
+ test.done();
+};
« lib/filterClasses.js ('K') | « lib/filterClasses.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld