Index: test/filterClasses.js |
=================================================================== |
--- a/test/filterClasses.js |
+++ b/test/filterClasses.js |
@@ -466,8 +466,23 @@ |
checkNotifications(() => |
{ |
filter.hitCount = 0; |
}, ["filter.hitCount", "foobar"], "Resetting filter hit counts"); |
filter.delete(); |
test.done(); |
}; |
+ |
+exports.testEmptyElemHideDomains = function(test) |
+{ |
+ [",##selector", ",,,##selector", "~,foo.com##selector", "foo.com,##selector", |
+ ",foo.com##selector", "foo.com,~##selector", |
+ "foo.com,,bar.com##selector", "foo.com,~,bar.com##selector"] |
+ .map(filterText => Filter.fromText(filterText)) |
+ .forEach(withNAD(0, filter => |
+ { |
+ test.ok(filter instanceof InvalidFilter); |
+ test.equal(filter.reason, "filter_invalid_domain"); |
+ })); |
+ |
+ test.done(); |
+}; |