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

Side by Side Diff: test/abp2blocklist.js

Issue 29443587: Noissue - Do not add subdomain wildcard if subdomain excluded (Closed) Base URL: https://hg.adblockplus.org/abp2blocklist
Patch Set: Rebase Created May 23, 2017, 5:03 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/abp2blocklist.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 testFilterOptions: function(test) 229 testFilterOptions: function(test)
230 { 230 {
231 testRules(test, ["1$domain=foo.com"], ["*foo.com"], 231 testRules(test, ["1$domain=foo.com"], ["*foo.com"],
232 rules => rules[0]["trigger"]["if-domain"]); 232 rules => rules[0]["trigger"]["if-domain"]);
233 testRules(test, ["2$third-party"], ["third-party"], 233 testRules(test, ["2$third-party"], ["third-party"],
234 rules => rules[0]["trigger"]["load-type"]); 234 rules => rules[0]["trigger"]["load-type"]);
235 testRules(test, ["foo$match_case"], true, 235 testRules(test, ["foo$match_case"], true,
236 rules => rules[0]["trigger"]["url-filter-is-case-sensitive"]); 236 rules => rules[0]["trigger"]["url-filter-is-case-sensitive"]);
237 237
238 // Test subdomain exceptions.
239 testRules(test, ["1$domain=foo.com|~bar.foo.com"],
240 ["foo.com", "www.foo.com"],
241 rules => rules[0]["trigger"]["if-domain"]);
242 testRules(test, ["1$domain=foo.com|~www.foo.com"],
243 ["foo.com"],
244 rules => rules[0]["trigger"]["if-domain"]);
245
238 test.done(); 246 test.done();
239 }, 247 },
240 248
241 testUnicode: function(test) 249 testUnicode: function(test)
242 { 250 {
243 testRules(test, ["$domain=🐈.cat"], ["*xn--zn8h.cat"], 251 testRules(test, ["$domain=🐈.cat"], ["*xn--zn8h.cat"],
244 rules => rules[0]["trigger"]["if-domain"]); 252 rules => rules[0]["trigger"]["if-domain"]);
245 testRules(test, ["🐈$domain=🐈.cat"], []); 253 testRules(test, ["🐈$domain=🐈.cat"], []);
246 testRules(test, ["###🐈"], []); 254 testRules(test, ["###🐈"], []);
247 255
248 test.done(); 256 test.done();
249 } 257 }
250 }; 258 };
OLDNEW
« no previous file with comments | « lib/abp2blocklist.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld