Index: test/elemHide.js |
=================================================================== |
--- a/test/elemHide.js |
+++ b/test/elemHide.js |
@@ -55,16 +55,25 @@ |
exports.testGetSelectorsForDomain = function(test) |
{ |
let addFilter = filterText => ElemHide.add(Filter.fromText(filterText)); |
let removeFilter = filterText => ElemHide.remove(Filter.fromText(filterText)); |
testResult(test, "", []); |
+ addFilter("##star"); |
+ testResult(test, "", ["star"]); |
+ testResult(test, "example.com", ["star"]); |
+ addFilter("~special.example.com#@#star"); |
+ testResult(test, "", []); |
+ testResult(test, "example.com", []); |
+ testResult(test, "special.example.com", ["star"]); |
+ testResult(test, "other.example.com", []); |
+ |
addFilter("~foo.example.com,example.com##foo"); |
testResult(test, "barfoo.example.com", ["foo"]); |
testResult(test, "bar.foo.example.com", []); |
testResult(test, "foo.example.com", []); |
testResult(test, "example.com", ["foo"]); |
testResult(test, "com", []); |
testResult(test, "", []); |