diff --git a/tracker-radar-tests/TR-domain-matching/tracker_allowlist_matching_tests.json b/tracker-radar-tests/TR-domain-matching/tracker_allowlist_matching_tests.json index 191c3bb..3a62820 100644 --- a/tracker-radar-tests/TR-domain-matching/tracker_allowlist_matching_tests.json +++ b/tracker-radar-tests/TR-domain-matching/tracker_allowlist_matching_tests.json @@ -150,5 +150,23 @@ "site": "https://testsite.com", "request": "http://a.b.c.videos.allowlist-tracker-2.com/a.js", "isAllowlisted": true + }, + { + "description": "* alone does not match wildcard", + "site": "https://testsite.com", + "request": "https://allowlist-tracker-2.com/anything/wildcard.js", + "isAllowlisted": false + }, + { + "description": "* works as a regex operator", + "site": "https://testsite.com", + "request": "https://allowlist-tracker-2.com/////wildcard.js", + "isAllowlisted": true + }, + { + "description": "Regex .* is treated as a wildcard", + "site": "https://testsite.com", + "request": "https://allowlist-tracker-2.com/anything/wildcard2.js", + "isAllowlisted": true } ] diff --git a/tracker-radar-tests/TR-domain-matching/tracker_allowlist_reference.json b/tracker-radar-tests/TR-domain-matching/tracker_allowlist_reference.json index 6793559..c866ba4 100644 --- a/tracker-radar-tests/TR-domain-matching/tracker_allowlist_reference.json +++ b/tracker-radar-tests/TR-domain-matching/tracker_allowlist_reference.json @@ -29,6 +29,16 @@ "rule": "allowlist-tracker-2.com/login.js", "domains": [""], "reason": "match single resource on all sites" + }, + { + "rule": "allowlist-tracker-2.com/*/wildcard.js", + "domains": [""], + "reason": "wildcard rule" + }, + { + "rule": "allowlist-tracker-2.com/.*/wildcard2.js", + "domains": [""], + "reason": "wildcard rule with regex syntax" } ] },