From aacacbb831c5658fc10b142c3b71efff7a7bdbc1 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 9 Mar 2022 12:55:57 +0100 Subject: improvement to also properly sanitize intrinsics in XML documents under older browsers (IceCat 60) --- test/haketilo_test/data/pages/scripts_to_block_2.xml | 2 +- test/haketilo_test/unit/test_policy_enforcing.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/haketilo_test/data/pages/scripts_to_block_2.xml b/test/haketilo_test/data/pages/scripts_to_block_2.xml index 6433a1d..7eea906 100644 --- a/test/haketilo_test/data/pages/scripts_to_block_2.xml +++ b/test/haketilo_test/data/pages/scripts_to_block_2.xml @@ -30,7 +30,7 @@ + onload="window.__run = [...(window.__run || []), 'melon'];"> diff --git a/test/haketilo_test/unit/test_policy_enforcing.py b/test/haketilo_test/unit/test_policy_enforcing.py index 98b5044..bbc3eb9 100644 --- a/test/haketilo_test/unit/test_policy_enforcing.py +++ b/test/haketilo_test/unit/test_policy_enforcing.py @@ -144,11 +144,7 @@ def test_policy_enforcing_xml(driver, execute_in_page, csp_off_setting): def assert_properly_blocked(): click_all() - try: - assert set(driver.execute_script('return window.__run || [];')) == set() - except: - from time import sleep - sleep(100000) + assert set(driver.execute_script('return window.__run || [];')) == set() assert bool(csp_off_setting) == are_scripts_allowed(driver) # First, see if scripts run when not blocked. -- cgit v1.2.3