@@ -2,11 +2,10 @@ import { promises as fsPromises } from 'fs';
2
2
import { join } from 'path' ;
3
3
import * as playwright from 'playwright-core' ;
4
4
import isLambdaRuntimeEnvironment from './util/isLambdaRuntimeEnvironment' ;
5
- import { LaunchOptions } from 'playwright-core/lib/server/browserType' ;
6
5
import isHeadlessModeEnabled from './util/isHeadlessModeEnabled' ;
7
6
import fileExists from './util/fileExists' ;
8
7
import setEnvironmentVariables from './util/setEnvironmentVariables' ;
9
- import getMemorySize from './util/getMemorySize ' ;
8
+ import { LaunchOptions } from 'playwright-core ' ;
10
9
11
10
const { inflate } = require ( 'lambdafs' ) ;
12
11
@@ -17,37 +16,32 @@ setEnvironmentVariables();
17
16
*/
18
17
export function getChromiumArgs ( headless : boolean ) {
19
18
const result = [
19
+ '--autoplay-policy=user-gesture-required' ,
20
+ '--disable-background-networking' ,
20
21
'--disable-background-timer-throttling' ,
22
+ '--disable-backgrounding-occluded-windows' ,
21
23
'--disable-breakpad' ,
22
24
'--disable-client-side-phishing-detection' ,
23
- '--disable-cloud-import ' ,
25
+ '--disable-component-update ' ,
24
26
'--disable-default-apps' ,
25
27
'--disable-dev-shm-usage' ,
28
+ '--disable-domain-reliability' ,
26
29
'--disable-extensions' ,
27
- '--disable-gesture-typing ' ,
30
+ '--disable-features=AudioServiceOutOfProcess ' ,
28
31
'--disable-hang-monitor' ,
29
- '--disable-infobars ' ,
32
+ '--disable-ipc-flooding-protection ' ,
30
33
'--disable-notifications' ,
31
34
'--disable-offer-store-unmasked-wallet-cards' ,
32
- '--disable-offer-upload-credit-cards' ,
33
35
'--disable-popup-blocking' ,
34
36
'--disable-print-preview' ,
35
37
'--disable-prompt-on-repost' ,
38
+ '--disable-renderer-backgrounding' ,
36
39
'--disable-setuid-sandbox' ,
37
40
'--disable-speech-api' ,
38
41
'--disable-sync' ,
39
- '--disable-tab-for-desktop-share' ,
40
- '--disable-translate' ,
41
- '--disable-voice-input' ,
42
- '--disable-wake-on-wifi' ,
43
42
'--disk-cache-size=33554432' ,
44
- '--enable-async-dns' ,
45
- '--enable-simple-cache-backend' ,
46
- '--enable-tcp-fast-open' ,
47
- '--enable-webgl' ,
48
43
'--hide-scrollbars' ,
49
44
'--ignore-gpu-blacklist' ,
50
- '--media-cache-size=33554432' ,
51
45
'--metrics-recording-only' ,
52
46
'--mute-audio' ,
53
47
'--no-default-browser-check' ,
@@ -56,15 +50,10 @@ export function getChromiumArgs(headless: boolean) {
56
50
'--no-sandbox' ,
57
51
'--no-zygote' ,
58
52
'--password-store=basic' ,
59
- '--prerender-from-omnibox=disabled' ,
60
53
'--use-gl=swiftshader' ,
61
54
'--use-mock-keychain' ,
62
55
] ;
63
56
64
- if ( getMemorySize ( ) >= 1024 ) {
65
- result . push ( '--memory-pressure-off' ) ;
66
- }
67
-
68
57
if ( headless === true ) {
69
58
result . push ( '--single-process' ) ;
70
59
} else {
0 commit comments