| Index: test/matcher.js | 
| =================================================================== | 
| --- a/test/matcher.js | 
| +++ b/test/matcher.js | 
| @@ -286,8 +286,25 @@ | 
| RegExpFilter.typeMap.IMAGE)); | 
| test.ok(!matcher.isWhitelisted("https://example.com/bar", | 
| RegExpFilter.typeMap.IMAGE)); | 
| test.ok(!matcher.isWhitelisted("https://example.com/foo", | 
| RegExpFilter.typeMap.SUBDOCUMENT)); | 
| test.done(); | 
| }; | 
| + | 
| +exports.testAddRemove = function(test) | 
| +{ | 
| + let matcher = new CombinedMatcher(); | 
| + | 
| + matcher.add(Filter.fromText("||example.com/foo/bar/image.jpg")); | 
| + | 
| + test.ok(!!matcher.matchesAny("https://example.com/foo/bar/image.jpg", | 
| + RegExpFilter.typeMap.IMAGE)); | 
| + | 
| + matcher.remove(Filter.fromText("||example.com/foo/bar/image.jpg")); | 
| + | 
| + test.ok(!matcher.matchesAny("https://example.com/foo/bar/image.jpg", | 
| + RegExpFilter.typeMap.IMAGE)); | 
| + | 
| + test.done(); | 
| +}; |