From 07a883feeeea63cc23fb5100a0618f29b0a5da9f Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Sat, 15 Jan 2022 12:35:47 +0100 Subject: make blocking rules queryable in pattern tree just as mappings are --- test/unit/test_webrequest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/unit/test_webrequest.py') diff --git a/test/unit/test_webrequest.py b/test/unit/test_webrequest.py index 6af2758..ae617aa 100644 --- a/test/unit/test_webrequest.py +++ b/test/unit/test_webrequest.py @@ -29,8 +29,13 @@ def webrequest_js(): '''; // Mock pattern tree. tree = pqt.make(); + + // Rule to block scripts. pqt.register(tree, "https://site.with.scripts.block.ed/***", - "disallowed", {allow: false}); + "~allow", 0); + + // Rule to allow scripts, but overridden by payload assignment. + pqt.register(tree, "https://site.with.paylo.ad/***", "~allow", 1); pqt.register(tree, "https://site.with.paylo.ad/***", "somemapping", {identifier: "someresource"}); -- cgit v1.2.3