diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-01-15 12:35:47 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-01-15 12:35:47 +0100 |
commit | 07a883feeeea63cc23fb5100a0618f29b0a5da9f (patch) | |
tree | 87569023aee35929308381344221f68566adc2ac /test/unit/test_webrequest.py | |
parent | e7d11c7c1173d07db741301053db78b835a73ab3 (diff) | |
download | browser-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.py | 7 |
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"}); |