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: Add a space after the escape sequence for { and } Created Dec. 13, 2016, 4: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
« 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
@@ -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\\x7B color: 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]\\x7B 2\\x7D /']",
+ "domains=FOO.COM"]);
+ test.done();
+};
« 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