aboutsummaryrefslogtreecommitdiff
path: root/test/unit/utils.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-01-17 14:15:43 +0100
committerWojtek Kosior <koszko@koszko.org>2022-01-17 14:15:43 +0100
commit31cc63c2b429b768379e1b2ef7598242d0b36d18 (patch)
treee279b77e3bb331e1b7e4807b7f755edf63197431 /test/unit/utils.py
parent7bedbcbd80eba9359d2e905b7693923c76ce563d (diff)
downloadbrowser-extension-31cc63c2b429b768379e1b2ef7598242d0b36d18.tar.gz
browser-extension-31cc63c2b429b768379e1b2ef7598242d0b36d18.zip
test script blocking with and without the CSP-based approach on
Diffstat (limited to 'test/unit/utils.py')
-rw-r--r--test/unit/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/utils.py b/test/unit/utils.py
index 8e04d91..4d8766e 100644
--- a/test/unit/utils.py
+++ b/test/unit/utils.py
@@ -191,12 +191,12 @@ broker_js = lambda: load_script('background/broadcast_broker.js') + ';start();'
def are_scripts_allowed(driver, nonce=None):
return driver.execute_script(
'''
- document.scripts_allowed = false;
+ document.haketilo_scripts_allowed = false;
const script = document.createElement("script");
- script.innerHTML = "document.scripts_allowed = true;";
+ script.innerHTML = "document.haketilo_scripts_allowed = true;";
if (arguments[0])
script.setAttribute("nonce", arguments[0]);
document.head.append(script);
- return document.scripts_allowed;
+ return document.haketilo_scripts_allowed;
''',
nonce)