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(); |
+}; |