Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimisations and `document` request and rule handling fixes #35

Merged
merged 10 commits into from Jun 28, 2019
Prev

Merge branch 'master' into optimisations-june

  • Loading branch information
AndriusA committed Jun 28, 2019
commit 86aa81eedb7094ed5093e2715d2a26eea85b3975
@@ -119,7 +119,7 @@ fn check_specific_rules() {

#[test]
fn check_specifics_default() {
let mut engine = get_blocker_engine();
let mut engine = get_blocker_engine_default();
{
let checked = engine.check_network_urls("https://www.youtube.com/youtubei/v1/log_event?alt=json&key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", "", "");
assert_eq!(checked.matched, true);
@@ -131,6 +131,25 @@ fn check_specifics_default() {
"main_frame");
assert_eq!(checked.matched, false, "Matched on {:?}", checked.filter);
}
{
engine.filter_add("@@||www.googleadservices.*/aclk?$first-party");
let checked = engine.check_network_urls("https://www.googleadservices.com/pagead/aclk?sa=L&ai=DChcSEwin96uLgYzjAhWH43cKHf0JA7YYABABGgJlZg&ohost=www.google.com&cid=CAASEuRoSkQKbbu2CAjK-zZJnF-wcw&sig=AOD64_1j63JqPtw22vaMasSE4aN1FRKtEw&ctype=5&q=&ved=0ahUKEwivnaWLgYzjAhUERxUIHWzYDTQQ9A4IzgI&adurl=",
"https://www.googleadservices.com/pagead/aclk?sa=L&ai=DChcSEwin96uLgYzjAhWH43cKHf0JA7YYABABGgJlZg&ohost=www.google.com&cid=CAASEuRoSkQKbbu2CAjK-zZJnF-wcw&sig=AOD64_1j63JqPtw22vaMasSE4aN1FRKtEw&ctype=5&q=&ved=0ahUKEwivnaWLgYzjAhUERxUIHWzYDTQQ9A4IzgI&adurl=",
"main_frame");
assert_eq!(checked.matched, false, "Matched on {:?}", checked.filter);
}
{
let checked = engine.check_network_urls("https://www.researchgate.net/profile/Ruofei_Zhang/publication/221653522_Bid_landscape_forecasting_in_online_Ad_exchange_marketplace/links/53f10c1f0cf2711e0c432641.pdf",
"https://www.researchgate.net/profile/Ruofei_Zhang/publication/221653522_Bid_landscape_forecasting_in_online_Ad_exchange_marketplace/links/53f10c1f0cf2711e0c432641.pdf",
"main_frame");
assert_eq!(checked.matched, false, "Matched on {:?}", checked.filter);
}
{
let checked = engine.check_network_urls("https://www.google.com/search?q=Bid+Landscape+Forecasting+in+Online+Exchange+Marketplace&oq=Landscape+Forecasting+in+Online+Ad+Exchange+Marketplace",
"https://www.google.com/search?q=Bid+Landscape+Forecasting+in+Online+Exchange+Marketplace&oq=Landscape+Forecasting+in+Online+Ad+Exchange+Marketplace",
"main_frame");
assert_eq!(checked.matched, false, "Matched on {:?}", checked.filter);
}
}

#[test]
You are viewing a condensed version of this merge commit. You can view the full changes here.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.