Index: test/filterClasses.js |
diff --git a/test/filterClasses.js b/test/filterClasses.js |
index 7bb75fc4642226ae0cf5175f0c896b45d1973924..905883b4fa4a69df2eedd1063ab2345feee9e125 100644 |
--- a/test/filterClasses.js |
+++ b/test/filterClasses.js |
@@ -366,3 +366,21 @@ exports.testCSSPropertyFilters = function(test) |
test.done(); |
}; |
+ |
+exports.testEmptyElemHideDomains = function(test) |
+{ |
+ let emptyDomainFilters = [ |
+ ",##selector", ",,,##selector", "~,foo.com##selector", "foo.com,##selector", |
+ ",foo.com##selector", "foo.com,~##selector", |
+ "foo.com,,bar.com##selector", "foo.com,~,bar.com##selector" |
+ ]; |
+ |
+ for (let filterText of emptyDomainFilters) |
+ { |
+ let filter = Filter.fromText(filterText); |
+ test.ok(filter instanceof InvalidFilter); |
+ test.equal(filter.reason, "filter_invalid_domain"); |
+ } |
+ |
+ test.done(); |
+}; |