aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_webrequest.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-01-15 12:35:47 +0100
committerWojtek Kosior <koszko@koszko.org>2022-01-15 12:35:47 +0100
commit07a883feeeea63cc23fb5100a0618f29b0a5da9f (patch)
tree87569023aee35929308381344221f68566adc2ac /test/unit/test_webrequest.py
parente7d11c7c1173d07db741301053db78b835a73ab3 (diff)
downloadbrowser-extension-07a883feeeea63cc23fb5100a0618f29b0a5da9f.tar.gz
browser-extension-07a883feeeea63cc23fb5100a0618f29b0a5da9f.zip
make blocking rules queryable in pattern tree just as mappings are
Diffstat (limited to 'test/unit/test_webrequest.py')
-rw-r--r--test/unit/test_webrequest.py7
1 files changed, 6 insertions, 1 deletions
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"});