File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const fs = require('fs');
88const { By, until, Button} = webdriver ;
99
1010const USE_HEADLESS = process . env . USE_HEADLESS !== 'no' ;
11+ const IS_ROOT_USER = process . getuid ( ) === 0 ;
1112
1213// The main reason for this timeout is so that we can control the timeout message and report details;
1314// if we hit the Jasmine default timeout then we get a terse message that we can't control.
@@ -63,6 +64,15 @@ class SeleniumHelper {
6364 args . push ( '--headless' ) ;
6465 }
6566
67+ if ( IS_ROOT_USER ) {
68+ args . push ( '--no-sandbox' ) ;
69+ args . push ( '--disable-setuid-sandbox' ) ;
70+ }
71+
72+ args . push ( '--disable-gpu' ) ;
73+ args . push ( '--disable-dev-shm-usage' ) ;
74+ args . push ( '--disable-extensions' ) ;
75+
6676 // Stub getUserMedia to always not allow access
6777 args . push ( '--use-fake-ui-for-media-stream=deny' ) ;
6878
You can’t perform that action at this time.
0 commit comments