Index: test/filterClasses.js |
diff --git a/test/filterClasses.js b/test/filterClasses.js |
index 7bb75fc4642226ae0cf5175f0c896b45d1973924..54fdc00afecd8deeddff0530b41d4fd3affda928 100644 |
--- a/test/filterClasses.js |
+++ b/test/filterClasses.js |
@@ -366,3 +366,20 @@ 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" |
Wladimir Palant
2016/10/06 08:06:14
What about empty domains in the middle? foo.com,,b
kzar
2016/10/06 08:53:56
Done.
|
+ ]; |
+ |
+ for (let filterText of emptyDomainFilters) |
+ { |
+ let filter = Filter.fromText(filterText); |
+ test.ok(filter instanceof InvalidFilter); |
+ test.equal(filter.reason, "filter_empty_domain"); |
+ } |
+ |
+ test.done(); |
+}; |