Revision ad69f9c8
Added by koszko over 1 year ago
test/misc_constants.py | ||
---|---|---|
27 | 27 |
# file's license. Although I request that you do not make use of this code |
28 | 28 |
# in a proprietary program, I am not going to enforce this in court. |
29 | 29 |
|
30 |
import re |
|
30 | 31 |
from pathlib import Path |
31 | 32 |
|
32 | 33 |
here = Path(__file__).resolve().parent |
... | ... | |
36 | 37 |
unit_test_defines = ['-D', 'MOZILLA', '-D', 'MV2', '-D', 'TEST', |
37 | 38 |
'-D', 'UNIT_TEST', '-D', 'DEBUG'] |
38 | 39 |
|
39 |
default_firefox_binary = '/usr/lib/icecat/icecat' |
|
40 |
# The browser might be loading some globally-installed add-ons by default. They |
|
41 |
# could interfere with the tests, so we'll disable all of them. |
|
42 |
default_clean_profile_dir = here / 'default_profile' / 'icecat_empty' |
|
40 |
conf_line_regex = re.compile(r'^([^=]+)=(.*)$') |
|
41 |
conf_settings = {} |
|
42 |
with open(here.parent / 'record.conf', 'rt') as conf: |
|
43 |
for line in conf.readlines(): |
|
44 |
match = conf_line_regex.match(line) |
|
45 |
if match: |
|
46 |
conf_settings[match.group(1).strip()] = match.group(2).strip() |
|
43 | 47 |
|
44 | 48 |
default_proxy_host = '127.0.0.1' |
45 | 49 |
default_proxy_port = 1337 |
Also available in: Unified diff
add support for testing with other browsers (especially Abrowser and Librewolf)
There are still some spurious failures when running under those newer browsers. Those will be systematically investigated and fixed.