Index: test/filterListener.js |
=================================================================== |
--- a/test/filterListener.js |
+++ b/test/filterListener.js |
@@ -61,23 +61,27 @@ |
function checkKnownFilters(test, text, expected) |
{ |
let result = {}; |
for (let type of ["blacklist", "whitelist"]) |
{ |
let matcher = defaultMatcher["_" + type]; |
let filters = []; |
- for (let [keyword, set] of matcher._filterByKeyword) |
+ for (let map of [matcher._simpleFiltersByKeyword, |
+ matcher._complexFiltersByKeyword]) |
{ |
- for (let filter of set) |
+ for (let [keyword, set] of map) |
{ |
- test.equal(matcher.findKeyword(filter), keyword, |
- "Keyword of filter " + filter.text); |
- filters.push(filter.text); |
+ for (let filter of set) |
+ { |
+ test.equal(matcher.findKeyword(filter), keyword, |
+ "Keyword of filter " + filter.text); |
+ filters.push(filter.text); |
+ } |
} |
} |
result[type] = filters; |
} |
let elemHide = sandboxedRequire("../lib/elemHide"); |
result.elemhide = []; |
for (let filter of elemHide.knownFilters) |