Skip to content

Commit

Permalink
feat(test): add MOZ_AUTOMATION=1 to ff test runner (#2049)
Browse files Browse the repository at this point in the history
this ensures that ff launcher on windows wait for browser instead of creating detached instance and quitting
for more info see ff wiki:
https://wiki.mozilla.org/Platform/Integration/InjectEject/Launcher_Process/#Starting_Firefox_via_Automation_.2F_Scripting
  • Loading branch information
Zekfad committed Jun 28, 2023
1 parent 6e675f8 commit 3d44fca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkgs/test/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Add support for `SAFARI_EXECUTABLE`, `FIREFOX_EXECUTABLE` and
`MS_EDGE_EXECUTABLE` for custom browser installations.
* Allow the latest analyzer (6.x.x).
* Add `MOZ_AUTOMATION=1` environmental variable to Firefox runner, to make
launcher process on Windows wait for browser exit.

## 1.24.3

Expand Down
3 changes: 2 additions & 1 deletion pkgs/test/lib/src/runner/browser/firefox.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class Firefox extends Browser {
'--no-remote',
...settings.arguments,
], environment: {
'MOZ_CRASHREPORTER_DISABLE': '1'
'MOZ_CRASHREPORTER_DISABLE': '1',
'MOZ_AUTOMATION': '1',
});

unawaited(process.exitCode.then((_) => Directory(dir).deleteWithRetry()));
Expand Down

0 comments on commit 3d44fca

Please sign in to comment.