Skip to content

Commit

Permalink
Validate 'isFirstParty' logic for tracker that only has eTLD+2 domain…
Browse files Browse the repository at this point in the history
… defined (#132)

* Added a test that validates that, when Tracker is defined for a eTLD+2 domain (e.g. bad.etld-plus-two.site), tracker requests are correctly Ignored

* Fixed whitespaces
  • Loading branch information
RendijsSmukulis authored Dec 18, 2024
1 parent 6133e7d commit a75e09f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
"requestType": "script",
"expectAction": "ignore"
},
{
"name": "same party ignore with deeper subdomain",
"siteURL": "https://bad.etld-plus-two.site/",
"requestURL": "https://bad.etld-plus-two.site/script.js",
"requestType": "script",
"expectAction": "ignore"
},
{
"name": "tracker loads ignore",
"siteURL": "https://bad.third-party.site/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,21 @@
"rules": [],
"default": "ignore"
},
"bad.etld-plus-two.site": {
"domain": "bad.etld-plus-two.site",
"owner": {
"name": "Test Site for Tracker Blocking With eTLD+2",
"displayName": "Bad Third Party Site eTLD+2",
"privacyPolicy": "",
"url": "http://bad.etld-plus-two.site"
},
"prevalence": 0.1,
"fingerprinting": 3,
"cookies": 0.1,
"categories": [],
"default": "block",
"rules": []
},
"tracker.test": {
"domain": "tracker.test",
"owner": {
Expand Down Expand Up @@ -819,6 +834,13 @@
"prevalence": 0.1,
"displayName": "Test Site for Tracker Blocking"
},
"Test Site for Tracker Blocking With eTLD+2": {
"domains": [
"bad.etld-plus-two.site"
],
"prevalence": 0.1,
"displayName": "Bad Third Party Site eTLD+2"
},
"Tests for formatting": {
"domains": [
"format.test"
Expand Down Expand Up @@ -876,6 +898,7 @@
"bad.third-party.site": "Test Site for Tracker Blocking",
"sometimes-bad.third-party.site": "Test Site for Tracker Blocking",
"broken.third-party.site": "Test Site for Tracker Blocking",
"bad.etld-plus-two.site": "Test Site for Tracker Blocking With eTLD+2",
"format.test": "Tests for formatting",
"third-party.site": "Test Site for Tracker Blocking",
"tracker.test": "Test Site for Tracker Blocking",
Expand Down

0 comments on commit a75e09f

Please sign in to comment.