Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/abp2blocklist.js

Issue 29438577: Issue 5248 - Use wildcard to match any subdomains (Closed) Base URL: https://hg.adblockplus.org/abp2blocklist
Patch Set: Created May 16, 2017, 1:06 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « package.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
};
« no previous file with comments | « package.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld