diff options
Diffstat (limited to 'test/unit/test_content.py')
-rw-r--r-- | test/unit/test_content.py | 8 |
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') |