Index: test/abp2blocklist.js |
=================================================================== |
--- a/test/abp2blocklist.js |
+++ b/test/abp2blocklist.js |
@@ -128,22 +128,22 @@ |
test.done(); |
}, |
testDomainWhitelisting: function(test) |
{ |
testRules(test, ["@@||example.com^$document"], [ |
{trigger: {"url-filter": ".*", |
- "if-domain": ["example.com", "www.example.com"]}, |
+ "if-domain": ["*example.com"]}, |
action: {type: "ignore-previous-rules"}} |
]); |
testRules(test, ["@@||example.com^$document,image"], [ |
{trigger: {"url-filter": ".*", |
- "if-domain": ["example.com", "www.example.com"]}, |
+ "if-domain": ["*example.com"]}, |
action: {type: "ignore-previous-rules"}}, |
{trigger: {"url-filter": "^https?://([^/]+\\.)?example\\.com", |
"url-filter-is-case-sensitive": true, |
"resource-type": ["image"]}, |
action: {type: "ignore-previous-rules"}} |
]); |
testRules(test, ["@@||example.com/path^$font,document"], [ |
{trigger: {"url-filter": "^https?://([^/]+\\.)?example\\.com/path", |
@@ -208,28 +208,28 @@ |
testRules(test, ["foo$sitekey=bar", "@@foo$genericblock", |
"@@bar$generichide"], []); |
test.done(); |
}, |
testFilterOptions: function(test) |
{ |
- testRules(test, ["1$domain=foo.com"], ["foo.com", "www.foo.com"], |
+ testRules(test, ["1$domain=foo.com"], ["*foo.com"], |
rules => rules[0]["trigger"]["if-domain"]); |
- testRules(test, ["2$domain=third-party"], ["third-party"], |
Manish Jethani
2017/05/16 01:08:27
This test was wrong, I've fixed it.
|
- rules => rules[0]["trigger"]["if-domain"]); |
+ testRules(test, ["2$third-party"], ["third-party"], |
+ rules => rules[0]["trigger"]["load-type"]); |
testRules(test, ["foo$match_case"], true, |
rules => rules[0]["trigger"]["url-filter-is-case-sensitive"]); |
test.done(); |
}, |
testUnicode: function(test) |
{ |
- testRules(test, ["$domain=🐈.cat"], ["xn--zn8h.cat", "www.xn--zn8h.cat"], |
+ testRules(test, ["$domain=🐈.cat"], ["*xn--zn8h.cat"], |
rules => rules[0]["trigger"]["if-domain"]); |
testRules(test, ["🐈$domain=🐈.cat"], []); |
testRules(test, ["###🐈"], []); |
test.done(); |
} |
}; |