aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_content.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-01-29 00:03:51 +0100
committerWojtek Kosior <koszko@koszko.org>2022-01-29 00:04:44 +0100
commit4c6a2323d90e9321ec2b78e226167b3013ea69ab (patch)
tree682ab3abd53a68d28d04f0470766699dcadd7294 /test/unit/test_content.py
parentea9df6c7688613783ca114f0f11c6f6baf30036b (diff)
downloadbrowser-extension-4c6a2323d90e9321ec2b78e226167b3013ea69ab.tar.gz
browser-extension-4c6a2323d90e9321ec2b78e226167b3013ea69ab.zip
make Haketilo buildable again (for Mozilla)
How cool it is to throw away 5755 lines of code...
Diffstat (limited to 'test/unit/test_content.py')
-rw-r--r--test/unit/test_content.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/test_content.py b/test/unit/test_content.py
index 35ab027..8220160 100644
--- a/test/unit/test_content.py
+++ b/test/unit/test_content.py
@@ -33,7 +33,7 @@ dynamic_script = \
''';
this.haketilo_secret = "abracadabra";
this.haketilo_pattern_tree = {};
- this.haketilo_defualt_allow = false;
+ this.haketilo_default_allow = false;
if (this.haketilo_content_script_main)
this.haketilo_content_script_main();
@@ -69,7 +69,7 @@ content_script = \
async function mock_payload_ok([type, res_id]) {
if (type === "indexeddb_files")
- return [1, 2].map(n => `window.haketilo_injected_${n} = ${n}${n};`);
+ return {files: [1, 2].map(n => `window.hak_injected_${n} = ${n};`)};
}
if (/payload_error/.test(document.URL)) {
@@ -162,7 +162,7 @@ def test_content_unprivileged_page(driver, execute_in_page, target1, target2):
def vars_made_by_payload(driver):
vars_values = driver.execute_script(
- 'return [1, 2].map(n => window[`haketilo_injected_${n}`]);'
+ 'return [1, 2].map(n => window[`hak_injected_${n}`]);'
)
if vars_values != [None, None]:
return vars_values
@@ -174,7 +174,7 @@ def test_content_unprivileged_page(driver, execute_in_page, target1, target2):
}
elif target2 == 'payload_ok':
vars_values = WebDriverWait(driver, 10).until(vars_made_by_payload)
- assert vars_values == [11, 22]
+ assert vars_values == [1, 2]
@pytest.mark.ext_data({'content_script': content_script})
@pytest.mark.usefixtures('webextension')