From 2e92f6083f536422b484c479bbc43332a6c5af40 Mon Sep 17 00:00:00 2001 From: Ben Moon Date: Fri, 19 May 2023 09:55:26 +0100 Subject: [PATCH 1/8] Add some tests for default:block --- .../domain_matching_tests.json | 98 +++++++++++++++++++ .../tracker_radar_reference.json | 61 ++++++++++++ 2 files changed, 159 insertions(+) diff --git a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json index 1188831..37a46be 100644 --- a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json +++ b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json @@ -314,6 +314,104 @@ "ios-browser" ] }, + { + "name": "standard1 - path matches ignore", + "siteURL": "https://example1.com", + "requestURL": "https://standard1.test/ignore1", + "requestType": "script", + "expectAction": "ignore" + }, + { + "name": "standard1 - path matches ignore (sandwiched)", + "siteURL": "https://example1.com", + "requestURL": "https://standard1.test/request-1b", + "requestType": "font", + "expectAction": "ignore" + }, + { + "name": "standard1 - path matches, exception does not (wrong domain, correct type)", + "siteURL": "https://example1.com", + "requestURL": "https://standard1.test/request-1a", + "requestType": "script", + "expectAction": "block" + }, + { + "name": "standard1 - path matches, exception does not (correct domain, wrong type)", + "siteURL": "https://example2.com", + "requestURL": "https://standard1.test/request-1a", + "requestType": "image", + "expectAction": "block" + }, + { + "name": "standard1 - path (2) matches, exception does not (wrong domain, correct type)", + "siteURL": "https://example1.com", + "requestURL": "https://standard1.test/request-1", + "requestType": "script", + "expectAction": "block" + }, + { + "name": "standard1 - path (2) matches, exception does not (correct domain, wrong type)", + "siteURL": "https://example3.com", + "requestURL": "https://standard1.test/request-1", + "requestType": "stylesheet", + "expectAction": "block" + }, + { + "name": "standard1 - path matches, exception does not (should not confuse with following exception)", + "siteURL": "https://example3.com", + "requestURL": "https://standard1.test/request-1a", + "requestType": "script", + "expectAction": "block" + }, + { + "name": "standard1 - path matches, exception matches", + "siteURL": "https://example2.com", + "requestURL": "https://standard1.test/request-1a", + "requestType": "script", + "expectAction": "ignore" + }, + { + "name": "standard1 - path matches, exception matches (2)", + "siteURL": "https://example2a.com", + "requestURL": "https://standard1.test/request-1a", + "requestType": "stylesheet", + "expectAction": "ignore" + }, + { + "name": "standard1 - path (2) matches, exception matches", + "siteURL": "https://example3.com", + "requestURL": "https://standard1.test/request-1", + "requestType": "script", + "expectAction": "ignore" + }, + { + "name": "standard1 - path (2) matches, exception matches (2)", + "siteURL": "https://example3a.com", + "requestURL": "https://standard1.test/request-1", + "requestType": "image", + "expectAction": "ignore" + }, + { + "name": "standard1 - following ignore matches", + "siteURL": "https://example1.com", + "requestURL": "https://standard1.test/request", + "requestType": "script", + "expectAction": "ignore" + }, + { + "name": "standard1 - following ignore matches (2)", + "siteURL": "https://example1.com", + "requestURL": "https://standard1.test/request-2", + "requestType": "script", + "expectAction": "ignore" + }, + { + "name": "standard1 - fall back to default", + "siteURL": "https://example1.com", + "requestURL": "https://standard1.test/other", + "requestType": "script", + "expectAction": "block" + }, { "name": "options1 - ignore on catch ignore after options", "siteURL": "https://example2.com", diff --git a/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json b/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json index 14c5f32..ffabc94 100644 --- a/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json +++ b/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json @@ -1,5 +1,59 @@ { "trackers": { + "standard1.test": { + "domain": "standard1.test", + "owner": { + "name": "Standard Test Tracker", + "displayName": "Standard Test Tracker", + "privacyPolicy": "", + "url": "" + }, + "prevalence": 0.1, + "fingerprinting": 2, + "cookies": 0.1, + "categories": [], + "default": "block", + "rules": [ + { + "rule": "standard1\\.test/ignore", + "action": "ignore" + }, + { + "rule": "standard1\\.test/request-1a", + "exceptions": { + "domains": [ + "example2.com", + "example2a.com" + ], + "types": [ + "script", + "stylesheet" + ] + } + }, + { + "rule": "standard1\\.test/request-1b", + "action": "ignore" + }, + { + "rule": "standard1\\.test/request-1", + "exceptions": { + "domains": [ + "example3.com", + "example3a.com" + ], + "types": [ + "script", + "image" + ] + } + }, + { + "rule": "standard1\\.test/request", + "action": "ignore" + } + ] + }, "bad.third-party.site": { "domain": "bad.third-party.site", "owner": { @@ -485,6 +539,12 @@ "prevalence": 0.1, "displayName": "Ignore Site for Tracker Blocking" }, + "Standard Test Tracker": { + "domains": [ + "standard1.test" + ], + "displayName": "Standard Test Tracker" + }, "Tests for options algorithms": { "domains": [ "options-trailing-exception.test", @@ -521,6 +581,7 @@ "options-trailing-exception.test": "Tests for options algorithms", "options-trailing-ignore.test": "Tests for options algorithms", "ignore.test": "Ignore Site for Tracker Blocking", + "standard1.test": "Standard Test Tracker", "sub.ignore.test": "Ignore Site for Tracker Blocking", "surrogates.test": "Test Site for Surrogates", "other-surrogates.test": "Test Site for Surrogates", From 37a91128cb31a24a39a87ae2853d41491f5c7fa7 Mon Sep 17 00:00:00 2001 From: Ben Moon Date: Fri, 19 May 2023 10:01:41 +0100 Subject: [PATCH 2/8] Add tests for default:ignore --- .../domain_matching_tests.json | 105 ++++++++++++++++++ .../tracker_radar_reference.json | 60 +++++++++- 2 files changed, 164 insertions(+), 1 deletion(-) diff --git a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json index 37a46be..91bb064 100644 --- a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json +++ b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json @@ -412,6 +412,111 @@ "requestType": "script", "expectAction": "block" }, + { + "name": "standard2 - path matches block", + "siteURL": "https://example1.com", + "requestURL": "https://standard2.test/block", + "requestType": "script", + "expectAction": "block" + }, + { + "name": "standard2 - path matches ignore (sandwiched)", + "siteURL": "https://example1.com", + "requestURL": "https://standard2.test/request-1b", + "requestType": "font", + "expectAction": "ignore" + }, + { + "name": "standard2 - path matches, exception does not (wrong domain, correct type)", + "siteURL": "https://example1.com", + "requestURL": "https://standard2.test/request-1a", + "requestType": "script", + "expectAction": "block" + }, + { + "name": "standard2 - path matches, exception does not (correct domain, wrong type)", + "siteURL": "https://example2.com", + "requestURL": "https://standard2.test/request-1a", + "requestType": "image", + "expectAction": "block" + }, + { + "name": "standard2 - path (2) matches, exception does not (wrong domain, correct type)", + "siteURL": "https://example1.com", + "requestURL": "https://standard2.test/request-1", + "requestType": "script", + "expectAction": "block" + }, + { + "name": "standard2 - path (2) matches, exception does not (correct domain, wrong type)", + "siteURL": "https://example3.com", + "requestURL": "https://standard2.test/request-1", + "requestType": "stylesheet", + "expectAction": "block" + }, + { + "name": "standard2 - path matches, exception does not (should not confuse with following exception)", + "siteURL": "https://example3.com", + "requestURL": "https://standard2.test/request-1a", + "requestType": "script", + "expectAction": "block" + }, + { + "name": "standard2 - path matches, exception matches", + "siteURL": "https://example2.com", + "requestURL": "https://standard2.test/request-1a", + "requestType": "script", + "expectAction": "ignore" + }, + { + "name": "standard2 - path matches, exception matches (2)", + "siteURL": "https://example2a.com", + "requestURL": "https://standard2.test/request-1a", + "requestType": "stylesheet", + "expectAction": "ignore" + }, + { + "name": "standard2 - path (2) matches, exception matches", + "siteURL": "https://example3.com", + "requestURL": "https://standard2.test/request-1", + "requestType": "script", + "expectAction": "ignore" + }, + { + "name": "standard2 - path (2) matches, exception matches (2)", + "siteURL": "https://example3a.com", + "requestURL": "https://standard2.test/request-1", + "requestType": "image", + "expectAction": "ignore" + }, + { + "name": "standard2 - following ignore matches", + "siteURL": "https://example1.com", + "requestURL": "https://standard2.test/request", + "requestType": "script", + "expectAction": "ignore" + }, + { + "name": "standard2 - following ignore matches (2)", + "siteURL": "https://example1.com", + "requestURL": "https://standard2.test/request-2", + "requestType": "script", + "expectAction": "ignore" + }, + { + "name": "standard2 - block following ignore matches", + "siteURL": "https://example1.com", + "requestURL": "https://standard2.test/reques", + "requestType": "script", + "expectAction": "block" + }, + { + "name": "standard2 - fall back to default", + "siteURL": "https://example1.com", + "requestURL": "https://standard2.test/other", + "requestType": "script", + "expectAction": "ignore" + }, { "name": "options1 - ignore on catch ignore after options", "siteURL": "https://example2.com", diff --git a/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json b/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json index ffabc94..aecc50d 100644 --- a/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json +++ b/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json @@ -54,6 +54,62 @@ } ] }, + "standard2.test": { + "domain": "standard2.test", + "owner": { + "name": "Standard Test Tracker", + "displayName": "Standard Test Tracker", + "privacyPolicy": "", + "url": "" + }, + "prevalence": 0.1, + "fingerprinting": 2, + "cookies": 0.1, + "categories": [], + "default": "ignore", + "rules": [ + { + "rule": "standard2\\.test/block" + }, + { + "rule": "standard2\\.test/request-1a", + "exceptions": { + "domains": [ + "example2.com", + "example2a.com" + ], + "types": [ + "script", + "stylesheet" + ] + } + }, + { + "rule": "standard2\\.test/request-1b", + "action": "ignore" + }, + { + "rule": "standard2\\.test/request-1", + "exceptions": { + "domains": [ + "example3.com", + "example3a.com" + ], + "types": [ + "script", + "image" + ] + } + }, + { + "rule": "standard2\\.test/request", + "action": "ignore" + }, + { + "rule": "standard2\\.test/reques" + } + ] + }, "bad.third-party.site": { "domain": "bad.third-party.site", "owner": { @@ -541,7 +597,8 @@ }, "Standard Test Tracker": { "domains": [ - "standard1.test" + "standard1.test", + "standard2.test" ], "displayName": "Standard Test Tracker" }, @@ -582,6 +639,7 @@ "options-trailing-ignore.test": "Tests for options algorithms", "ignore.test": "Ignore Site for Tracker Blocking", "standard1.test": "Standard Test Tracker", + "standard2.test": "Standard Test Tracker", "sub.ignore.test": "Ignore Site for Tracker Blocking", "surrogates.test": "Test Site for Surrogates", "other-surrogates.test": "Test Site for Surrogates", From 0af8de0fdd15f342fe4282d6322476dfbd43fc00 Mon Sep 17 00:00:00 2001 From: Ben Moon Date: Fri, 19 May 2023 10:09:20 +0100 Subject: [PATCH 3/8] Add a couple of robustness tests --- .../domain_matching_tests.json | 14 +++++ .../tracker_radar_reference.json | 56 +++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json index 91bb064..cd01226 100644 --- a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json +++ b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json @@ -517,6 +517,20 @@ "requestType": "script", "expectAction": "ignore" }, + { + "name": "robustness1 - default:block, less general block after ignore obeys ignore", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/request-1", + "requestType": "script", + "expectAction": "ignore" + }, + { + "name": "robustness2 - default:ignore, less general block after ignore obeys ignore", + "siteURL": "https://example1.com", + "requestURL": "https://robustness2.test/request-1", + "requestType": "script", + "expectAction": "ignore" + }, { "name": "options1 - ignore on catch ignore after options", "siteURL": "https://example2.com", diff --git a/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json b/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json index aecc50d..d71f83b 100644 --- a/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json +++ b/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json @@ -110,6 +110,52 @@ } ] }, + "robustness1.test": { + "domain": "robustness1.test", + "owner": { + "name": "Robustness Tests", + "displayName": "Checking robustness of interpretation", + "privacyPolicy": "", + "url": "" + }, + "prevalence": 0.1, + "fingerprinting": 2, + "cookies": 0.1, + "categories": [], + "default": "block", + "rules": [ + { + "rule": "robustness1\\.test/request", + "action": "ignore" + }, + { + "rule": "robustness1\\.test/request-1" + } + ] + }, + "robustness2.test": { + "domain": "robustness2.test", + "owner": { + "name": "Robustness Tests", + "displayName": "Checking robustness of interpretation", + "privacyPolicy": "", + "url": "" + }, + "prevalence": 0.1, + "fingerprinting": 2, + "cookies": 0.1, + "categories": [], + "default": "ignore", + "rules": [ + { + "rule": "robustness2\\.test/request", + "action": "ignore" + }, + { + "rule": "robustness2\\.test/request-1" + } + ] + }, "bad.third-party.site": { "domain": "bad.third-party.site", "owner": { @@ -595,6 +641,14 @@ "prevalence": 0.1, "displayName": "Ignore Site for Tracker Blocking" }, + "Robustness Tests": { + "domains": [ + "robustness1.test", + "robustness2.test" + ], + "prevalence": 0.1, + "displayName": "Checking robustness of interpretation" + }, "Standard Test Tracker": { "domains": [ "standard1.test", @@ -638,6 +692,8 @@ "options-trailing-exception.test": "Tests for options algorithms", "options-trailing-ignore.test": "Tests for options algorithms", "ignore.test": "Ignore Site for Tracker Blocking", + "robustness1.test": "Robustness Tests", + "robustness2.test": "Robustness Tests", "standard1.test": "Standard Test Tracker", "standard2.test": "Standard Test Tracker", "sub.ignore.test": "Ignore Site for Tracker Blocking", From 3c501afdccf37e574725086f58668a38b7a02a45 Mon Sep 17 00:00:00 2001 From: Ben Moon Date: Sat, 20 May 2023 11:55:50 +0100 Subject: [PATCH 4/8] Disable test that hangs iOS suite --- .../domain_matching_tests.json | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json index cd01226..a63929e 100644 --- a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json +++ b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json @@ -322,12 +322,22 @@ "expectAction": "ignore" }, { - "name": "standard1 - path matches ignore (sandwiched)", + "name": "standard1 - path matches ignore (sandwiched) (type=script)", "siteURL": "https://example1.com", "requestURL": "https://standard1.test/request-1b", - "requestType": "font", + "requestType": "script", "expectAction": "ignore" }, + { + "name": "standard1 - path matches ignore (sandwiched) (type=font)", + "siteURL": "https://example1.com", + "requestURL": "https://standard1.test/request-1b", + "requestType": "font", + "expectAction": "ignore", + "exceptPlatforms": [ + "ios-browser" + ] + }, { "name": "standard1 - path matches, exception does not (wrong domain, correct type)", "siteURL": "https://example1.com", @@ -420,12 +430,22 @@ "expectAction": "block" }, { - "name": "standard2 - path matches ignore (sandwiched)", + "name": "standard2 - path matches ignore (sandwiched) (type=script)", "siteURL": "https://example1.com", "requestURL": "https://standard2.test/request-1b", - "requestType": "font", + "requestType": "script", "expectAction": "ignore" }, + { + "name": "standard2 - path matches ignore (sandwiched) (type=font)", + "siteURL": "https://example1.com", + "requestURL": "https://standard2.test/request-1b", + "requestType": "font", + "expectAction": "ignore", + "exceptPlatforms": [ + "ios-browser" + ] + }, { "name": "standard2 - path matches, exception does not (wrong domain, correct type)", "siteURL": "https://example1.com", From a9d760aae06cb4d5e2d71e2e962e6bd7c5243d7c Mon Sep 17 00:00:00 2001 From: Ben Moon Date: Sat, 20 May 2023 12:40:41 +0100 Subject: [PATCH 5/8] Add exceptions for failing iOS --- .../domain_matching_tests.json | 70 +++++++++++++++---- 1 file changed, 56 insertions(+), 14 deletions(-) diff --git a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json index a63929e..1fad1fd 100644 --- a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json +++ b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json @@ -343,35 +343,50 @@ "siteURL": "https://example1.com", "requestURL": "https://standard1.test/request-1a", "requestType": "script", - "expectAction": "block" + "expectAction": "block", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "standard1 - path matches, exception does not (correct domain, wrong type)", "siteURL": "https://example2.com", "requestURL": "https://standard1.test/request-1a", "requestType": "image", - "expectAction": "block" + "expectAction": "block", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "standard1 - path (2) matches, exception does not (wrong domain, correct type)", "siteURL": "https://example1.com", "requestURL": "https://standard1.test/request-1", "requestType": "script", - "expectAction": "block" + "expectAction": "block", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "standard1 - path (2) matches, exception does not (correct domain, wrong type)", "siteURL": "https://example3.com", "requestURL": "https://standard1.test/request-1", "requestType": "stylesheet", - "expectAction": "block" + "expectAction": "block", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "standard1 - path matches, exception does not (should not confuse with following exception)", "siteURL": "https://example3.com", "requestURL": "https://standard1.test/request-1a", "requestType": "script", - "expectAction": "block" + "expectAction": "block", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "standard1 - path matches, exception matches", @@ -434,7 +449,10 @@ "siteURL": "https://example1.com", "requestURL": "https://standard2.test/request-1b", "requestType": "script", - "expectAction": "ignore" + "expectAction": "ignore", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "standard2 - path matches ignore (sandwiched) (type=font)", @@ -486,42 +504,60 @@ "siteURL": "https://example2.com", "requestURL": "https://standard2.test/request-1a", "requestType": "script", - "expectAction": "ignore" + "expectAction": "ignore", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "standard2 - path matches, exception matches (2)", "siteURL": "https://example2a.com", "requestURL": "https://standard2.test/request-1a", "requestType": "stylesheet", - "expectAction": "ignore" + "expectAction": "ignore", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "standard2 - path (2) matches, exception matches", "siteURL": "https://example3.com", "requestURL": "https://standard2.test/request-1", "requestType": "script", - "expectAction": "ignore" + "expectAction": "ignore", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "standard2 - path (2) matches, exception matches (2)", "siteURL": "https://example3a.com", "requestURL": "https://standard2.test/request-1", "requestType": "image", - "expectAction": "ignore" + "expectAction": "ignore", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "standard2 - following ignore matches", "siteURL": "https://example1.com", "requestURL": "https://standard2.test/request", "requestType": "script", - "expectAction": "ignore" + "expectAction": "ignore", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "standard2 - following ignore matches (2)", "siteURL": "https://example1.com", "requestURL": "https://standard2.test/request-2", "requestType": "script", - "expectAction": "ignore" + "expectAction": "ignore", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "standard2 - block following ignore matches", @@ -542,14 +578,20 @@ "siteURL": "https://example1.com", "requestURL": "https://robustness1.test/request-1", "requestType": "script", - "expectAction": "ignore" + "expectAction": "ignore", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "robustness2 - default:ignore, less general block after ignore obeys ignore", "siteURL": "https://example1.com", "requestURL": "https://robustness2.test/request-1", "requestType": "script", - "expectAction": "ignore" + "expectAction": "ignore", + "exceptPlatforms": [ + "ios-browser" + ] }, { "name": "options1 - ignore on catch ignore after options", From 065a6371a575871c95153b40b9d8c1b30dd2cbc2 Mon Sep 17 00:00:00 2001 From: Ben Moon Date: Sat, 20 May 2023 12:53:51 +0100 Subject: [PATCH 6/8] Add tests for resource exception types --- .../domain_matching_tests.json | 161 ++++++++++++++++++ .../tracker_radar_reference.json | 27 +++ 2 files changed, 188 insertions(+) diff --git a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json index 1fad1fd..b87bf56 100644 --- a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json +++ b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json @@ -583,6 +583,167 @@ "ios-browser" ] }, + { + "name": "robustness1 - resource type exemption: document", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "document", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: image", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "image", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: style-sheet", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "style-sheet", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: stylesheet", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "stylesheet", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: script", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "script", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: font", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "font", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: raw", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "raw", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: svg-document", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "svg-document", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: svg", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "svg", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: media", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "media", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: popup", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "popup", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: ping", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "ping", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: fetch", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "fetch", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: websocket", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "websocket", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: other", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "other", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: xhr", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "xhr", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: xhr", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "xmlhttprequest", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: eventsource", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "eventsource", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: snippet", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "snippet", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: texttrack", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "texttrack", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: sms-script", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "sms-script", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: sm-stylesheet", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "sm-stylesheet", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: manifest", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "manifest", + "expectAction": "ignore" + }, { "name": "robustness2 - default:ignore, less general block after ignore obeys ignore", "siteURL": "https://example1.com", diff --git a/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json b/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json index d71f83b..b295928 100644 --- a/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json +++ b/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json @@ -130,6 +130,33 @@ }, { "rule": "robustness1\\.test/request-1" + }, + { + "rule": "robustness1\\.test/resourceTest", + "exceptions": { + "types": [ + "document", + "image", + "stylesheet", + "script", + "font", + "raw", + "svg", + "media", + "popup", + "ping", + "fetch", + "websocket", + "other", + "xhr", + "eventsource", + "snippet", + "texttrack", + "sms-script", + "sm-stylesheet", + "manifest" + ] + } } ] }, From 8d68803f4317fd07e7763269d7306a6ee95c0e74 Mon Sep 17 00:00:00 2001 From: Ben Moon Date: Sat, 20 May 2023 13:35:25 +0100 Subject: [PATCH 7/8] Add some extension exceptions --- .../TR-domain-matching/domain_matching_tests.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json index b87bf56..44ebe8c 100644 --- a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json +++ b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json @@ -602,7 +602,11 @@ "siteURL": "https://example1.com", "requestURL": "https://robustness1.test/resourceTest", "requestType": "style-sheet", - "expectAction": "ignore" + "expectAction": "ignore", + "exceptPlatforms": [ + "web-extension", + "web-extension-mv3" + ] }, { "name": "robustness1 - resource type exemption: stylesheet", @@ -693,7 +697,11 @@ "siteURL": "https://example1.com", "requestURL": "https://robustness1.test/resourceTest", "requestType": "xhr", - "expectAction": "ignore" + "expectAction": "ignore", + "exceptPlatforms": [ + "web-extension", + "web-extension-mv3" + ] }, { "name": "robustness1 - resource type exemption: xhr", From a534a6e281d304b44467d45a904ac69da4ce54f1 Mon Sep 17 00:00:00 2001 From: Ben Moon Date: Sat, 20 May 2023 13:35:41 +0100 Subject: [PATCH 8/8] Add more resource types from MV3 --- .../domain_matching_tests.json | 44 ++++++++++++++++++- .../tracker_radar_reference.json | 8 +++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json index 44ebe8c..1e3d9d9 100644 --- a/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json +++ b/tracker-radar-tests/TR-domain-matching/domain_matching_tests.json @@ -704,7 +704,7 @@ ] }, { - "name": "robustness1 - resource type exemption: xhr", + "name": "robustness1 - resource type exemption: xmlhttprequest", "siteURL": "https://example1.com", "requestURL": "https://robustness1.test/resourceTest", "requestType": "xmlhttprequest", @@ -752,6 +752,48 @@ "requestType": "manifest", "expectAction": "ignore" }, + { + "name": "robustness1 - resource type exemption: main_frame", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "main_frame", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: sub_frame", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "sub_frame", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: object", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "object", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: csp_report", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "csp_report", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: webtransport", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "webtransport", + "expectAction": "ignore" + }, + { + "name": "robustness1 - resource type exemption: webbundle", + "siteURL": "https://example1.com", + "requestURL": "https://robustness1.test/resourceTest", + "requestType": "webbundle", + "expectAction": "ignore" + }, { "name": "robustness2 - default:ignore, less general block after ignore obeys ignore", "siteURL": "https://example1.com", diff --git a/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json b/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json index b295928..2fdfd34 100644 --- a/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json +++ b/tracker-radar-tests/TR-domain-matching/tracker_radar_reference.json @@ -154,7 +154,13 @@ "texttrack", "sms-script", "sm-stylesheet", - "manifest" + "manifest", + "main_frame", + "sub_frame", + "object", + "csp_report", + "webtransport", + "webbundle" ] } }