Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def configure(data_dir):

class FirefoxConfig:
data_dir_flag = '-profile '
default_flags = ('-new-instance',)
default_flags = ('-new-instance', '-wait-for-browser') if WINDOWS else ('-new-instance',)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably warrants a comment here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'll add one. I am still testing to understand why this is necessary.

headless_flags = '-headless'
executable_name = utils.exe_suffix('firefox')

Expand Down Expand Up @@ -2081,13 +2081,13 @@ def launch_browser_harness_with_proc_snapshot_workaround(cls, parallel_harness,
# Give the browser time to spawn its subprocesses. Use an increasing
# timeout as a crude way to account for system load.
if parallel_harness or is_safari():
time.sleep(min(2 + count * 0.3, 10))
time.sleep(min(5 + count * 0.3, 10))
procs_after = list_processes_by_name(config.executable_name)

# Take a snapshot again to find which processes exist after launching
# the browser. Then the newly launched browser processes are determined
# by the delta before->after.
cls.browser_procs = list(set(procs_after).difference(set(procs_before)))
cls.browser_procs += list(set(procs_after).difference(set(procs_before)))
if len(cls.browser_procs) == 0:
exit_with_error('Could not detect the launched browser subprocesses. The test harness will not be able to close the browser after testing is done, so aborting the test run here.')

Expand Down