aboutsummaryrefslogtreecommitdiff
path: root/test/haketilo_test/profiles.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-02-17 16:31:42 +0100
committerWojtek Kosior <koszko@koszko.org>2022-02-17 16:34:56 +0100
commitee0a4a935a95a9472655f85a04e1323f3d328898 (patch)
tree2a2228b138be8979f19cca334a8802e33540acbe /test/haketilo_test/profiles.py
parent3e4bde861cdee3312e1d410dc08f67d8e7c9168c (diff)
downloadbrowser-extension-ee0a4a935a95a9472655f85a04e1323f3d328898.tar.gz
browser-extension-ee0a4a935a95a9472655f85a04e1323f3d328898.zip
automatically pick up a free port to run the HTTP proxy on
It is now possible to run multiple `make test` commands in parallel (e.g. testing abrowser and librewolf simultaneously after running `configure` for each of them in 2 different directories).
Diffstat (limited to 'test/haketilo_test/profiles.py')
-rwxr-xr-xtest/haketilo_test/profiles.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/haketilo_test/profiles.py b/test/haketilo_test/profiles.py
index ae997fc..e1fc368 100755
--- a/test/haketilo_test/profiles.py
+++ b/test/haketilo_test/profiles.py
@@ -80,9 +80,8 @@ def set_webextension_uuid(profile, extension_id, uuid=default_extension_uuid):
profile.set_preference('extensions.webextensions.uuids',
json.dumps({extension_id: uuid}))
-def firefox_safe_mode(firefox_binary=conf_settings['BROWSER_BINARY'],
- proxy_host=default_proxy_host,
- proxy_port=default_proxy_port):
+def firefox_safe_mode(proxy_port, proxy_host=default_proxy_host,
+ firefox_binary=conf_settings['BROWSER_BINARY']):
"""
Initialize a Firefox instance controlled by selenium. The instance is
started in safe mode.
@@ -97,10 +96,9 @@ def firefox_safe_mode(firefox_binary=conf_settings['BROWSER_BINARY'],
return HaketiloFirefox(options=options, firefox_profile=profile,
firefox_binary=firefox_binary)
-def firefox_with_profile(firefox_binary=conf_settings['BROWSER_BINARY'],
- profile_dir=conf_settings['CLEAN_PROFILE'],
- proxy_host=default_proxy_host,
- proxy_port=default_proxy_port):
+def firefox_with_profile(proxy_port, proxy_host=default_proxy_host,
+ firefox_binary=conf_settings['BROWSER_BINARY'],
+ profile_dir=conf_settings['CLEAN_PROFILE']):
"""
Initialize a Firefox instance controlled by selenium. The instance is
started using an empty profile (either the default one or the one passed to