summaryrefslogtreecommitdiff
path: root/test/extension_crafting.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2021-12-14 21:40:23 +0100
committerWojtek Kosior <koszko@koszko.org>2021-12-14 22:06:58 +0100
commit58fe4c7d806359bed299f74ba56902ab396a6ed1 (patch)
tree38cc0620fe36c5bd7ef7df7dd9f24d332a51fdee /test/extension_crafting.py
parent79446ca52cea0864ebe2540ba774cc386ee2f8bc (diff)
downloadbrowser-extension-58fe4c7d806359bed299f74ba56902ab396a6ed1.tar.gz
browser-extension-58fe4c7d806359bed299f74ba56902ab396a6ed1.zip
facilitate broadcasting messages to different execution contexts within the webextension
Diffstat (limited to 'test/extension_crafting.py')
-rw-r--r--test/extension_crafting.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/extension_crafting.py b/test/extension_crafting.py
index 6f1800b..9b985b3 100644
--- a/test/extension_crafting.py
+++ b/test/extension_crafting.py
@@ -116,6 +116,8 @@ def make_extension(destination_dir,
destination_path = destination_dir / f'{extension_id}.xpi'
with zipfile.ZipFile(destination_path, 'x') as xpi:
for filename, contents in files.items():
+ if hasattr(contents, '__call__'):
+ contents = contents()
xpi.writestr(filename, contents)
return destination_path