Skip to content

Commit

Permalink
Add reference tests to ensure unsupported rule actions are ignored (#69)
Browse files Browse the repository at this point in the history
With v4 of the block list, there can be rules with a custom rule
action (e.g. for the Click to Load feature). Platforms are expected to
ignore any such rules completely if the rule action isn't known to
them.
  • Loading branch information
kzar authored Jan 13, 2023
1 parent 88d351f commit 4fdbbb6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tracker-radar-tests/TR-domain-matching/domain_matching_tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,20 @@
"ios-browser",
"web-extension-mv3"
]
},
{
"name": "unknown rule action ignored, default block",
"siteURL": "https://random.test/",
"requestURL": "https://tracker.test/unsupported-action",
"requestType": "script",
"expectAction": "block"
},
{
"name": "unknown rule action ignored, default ignore",
"siteURL": "https://random.test/",
"requestURL": "https://ignore.test/unsupported-action",
"requestType": "script",
"expectAction": "ignore"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
{
"action": "ignore",
"rule": "tracker\\.test\\/breakage"
},
{
"action": "unsupported-action",
"rule": "tracker\\.test\\/unsupported-action"
}
]
},
Expand All @@ -82,6 +86,10 @@
"rules": [
{
"rule": "ignore\\.test\\/tracker"
},
{
"action": "unsupported-action",
"rule": "ignore\\.test/unsupported-action"
}
]
},
Expand Down

0 comments on commit 4fdbbb6

Please sign in to comment.