| Index: chrome/content/tests/filterClasses.js |
| =================================================================== |
| --- a/chrome/content/tests/filterClasses.js |
| +++ b/chrome/content/tests/filterClasses.js |
| @@ -38,6 +38,9 @@ |
| result.push("contentType=" + filter.contentType); |
| result.push("matchCase=" + filter.matchCase); |
| + let sitekeys = filter.sitekeys || []; |
| + result.push("sitekeys=" + sitekeys.sort().join("|")); |
|
Wladimir Palant
2014/09/10 21:55:06
sitekeys.sort() will have side-effects - it will a
Thomas Greiner
2014/12/11 14:33:55
Done.
|
| + |
| result.push("thirdParty=" + filter.thirdParty); |
| if (filter instanceof BlockingFilter) |
| { |
| @@ -93,6 +96,7 @@ |
| addProperty("matchCase", "false"); |
| addProperty("thirdParty", "null"); |
| addProperty("domains", ""); |
| + addProperty("sitekeys", ""); |
| } |
| if (type == "filterlist") |
| { |
| @@ -214,6 +218,9 @@ |
| compareFilter("bla$~match-case,~script,~other,~third-party,domain=~bar.com", ["type=filterlist", "text=bla$~match-case,~script,~other,~third-party,domain=~bar.com", "regexp=bla", "contentType=" + (defaultTypes & ~(t.SCRIPT | t.OTHER) | t.DOCUMENT), "thirdParty=false", "domains=~BAR.COM"]); |
| compareFilter("@@bla$match-case,script,other,third-party,domain=foo.com|bar.com|~bar.foo.com|~foo.bar.com", ["type=whitelist", "text=@@bla$match-case,script,other,third-party,domain=foo.com|bar.com|~bar.foo.com|~foo.bar.com", "regexp=bla", "matchCase=true", "contentType=" + (t.SCRIPT | t.OTHER), "thirdParty=true", "domains=BAR.COM|FOO.COM|~BAR.FOO.COM|~FOO.BAR.COM"]); |
| + compareFilter("bla$match-case,script,other,third-party,sitekey=foo", ["type=filterlist", "text=bla$match-case,script,other,third-party,sitekey=foo", "regexp=bla", "matchCase=true", "contentType=" + (t.SCRIPT | t.OTHER), "thirdParty=true", "sitekeys=FOO"]); |
| + compareFilter("@@bla$match-case,script,other,third-party,sitekey=foo|bar", ["type=whitelist", "text=@@bla$match-case,script,other,third-party,sitekey=foo|bar", "regexp=bla", "matchCase=true", "contentType=" + (t.SCRIPT | t.OTHER), "thirdParty=true", "sitekeys=BAR|FOO"]); |
|
Wladimir Palant
2014/09/10 21:55:06
It's ok to add the sitekey option to the tests abo
Thomas Greiner
2014/12/11 14:33:55
Done.
|
| + |
| // background and image should be the same for backwards compatibility |
| compareFilter("bla$image", ["type=filterlist", "text=bla$image", "regexp=bla", "contentType=" + (t.IMAGE)]); |
| compareFilter("bla$background", ["type=filterlist", "text=bla$background", "regexp=bla", "contentType=" + (t.IMAGE)]); |