mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore(bidi): suppress crash reporter in firefox (#32694)
Same settings as geckodriver uses upstream: https://searchfox.org/mozilla-central/rev/c414b4538dd3c7e1dc674f7b66176e7c309afa95/testing/geckodriver/src/browser.rs#130-132
This commit is contained in:
parent
427eca6f7e
commit
48d3d5554d
@ -51,6 +51,14 @@ export class BidiFirefox extends BrowserType {
|
|||||||
override amendEnvironment(env: Env, userDataDir: string, executable: string, browserArguments: string[]): Env {
|
override amendEnvironment(env: Env, userDataDir: string, executable: string, browserArguments: string[]): Env {
|
||||||
if (!path.isAbsolute(os.homedir()))
|
if (!path.isAbsolute(os.homedir()))
|
||||||
throw new Error(`Cannot launch Firefox with relative home directory. Did you set ${os.platform() === 'win32' ? 'USERPROFILE' : 'HOME'} to a relative path?`);
|
throw new Error(`Cannot launch Firefox with relative home directory. Did you set ${os.platform() === 'win32' ? 'USERPROFILE' : 'HOME'} to a relative path?`);
|
||||||
|
|
||||||
|
env = {
|
||||||
|
...env,
|
||||||
|
'MOZ_CRASHREPORTER': '1',
|
||||||
|
'MOZ_CRASHREPORTER_NO_REPORT': '1',
|
||||||
|
'MOZ_CRASHREPORTER_SHUTDOWN': '1',
|
||||||
|
};
|
||||||
|
|
||||||
if (os.platform() === 'linux') {
|
if (os.platform() === 'linux') {
|
||||||
// Always remove SNAP_NAME and SNAP_INSTANCE_NAME env variables since they
|
// Always remove SNAP_NAME and SNAP_INSTANCE_NAME env variables since they
|
||||||
// confuse Firefox: in our case, builds never come from SNAP.
|
// confuse Firefox: in our case, builds never come from SNAP.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user