@@ -19,7 +19,6 @@ function showHelp() {
1919console . log ( " --debug : show extra information about script run" ) ;
2020console . log ( " --show-text : render font in pages" ) ;
2121console . log ( " --no-headless : disable headless mode" ) ;
22- console . log ( " --no-sandbox : disable sandbox mode" ) ;
2322console . log ( " --help : show this message then quit" ) ;
2423console . log ( " --tests-folder [PATH] : location of the .GOML tests folder" ) ;
2524console . log ( " --jobs [NUMBER] : number of threads to run tests on" ) ;
@@ -40,7 +39,6 @@ function parseOptions(args) {
4039"no_headless" : false ,
4140"jobs" : - 1 ,
4241"executable_path" : null ,
43- "no_sandbox" : false ,
4442} ;
4543const correspondences = {
4644"--doc-folder" : "doc_folder" ,
@@ -49,7 +47,6 @@ function parseOptions(args) {
4947"--show-text" : "show_text" ,
5048"--no-headless" : "no_headless" ,
5149"--executable-path" : "executable_path" ,
52- "--no-sandbox" : "no_sandbox" ,
5350} ;
5451
5552for ( let i = 0 ; i < args . length ; ++ i ) {
@@ -80,9 +77,6 @@ function parseOptions(args) {
8077} else if ( arg === "--help" ) {
8178showHelp ( ) ;
8279process . exit ( 0 ) ;
83- } else if ( arg === "--no-sandbox" ) {
84- console . log ( "`--no-sandbox` is being used. Be very careful!" ) ;
85- opts [ correspondences [ arg ] ] = true ;
8680} else if ( correspondences [ arg ] ) {
8781opts [ correspondences [ arg ] ] = true ;
8882} else {
@@ -203,6 +197,7 @@ async function main(argv) {
203197const args = [
204198"--variable" , "DOC_PATH" , opts [ "doc_folder" ] . split ( "\\" ) . join ( "/" ) ,
205199"--enable-fail-on-js-error" , "--allow-file-access-from-files" ,
200+ "--no-sandbox" ,
206201] ;
207202if ( opts [ "debug" ] ) {
208203debug = true ;
@@ -211,9 +206,6 @@ async function main(argv) {
211206if ( opts [ "show_text" ] ) {
212207args . push ( "--show-text" ) ;
213208}
214- if ( opts [ "no_sandbox" ] ) {
215- args . push ( "--no-sandbox" ) ;
216- }
217209if ( opts [ "no_headless" ] ) {
218210args . push ( "--no-headless" ) ;
219211headless = false ;
@@ -262,19 +254,6 @@ async function main(argv) {
262254console . log ( `Running ${ files . length } rustdoc-gui ...` ) ;
263255}
264256
265- // We catch this "event" to display a nicer message in case of unexpected exit (because of a
266- // missing `--no-sandbox`).
267- const exitHandling = ( ) => {
268- if ( ! opts [ "no_sandbox" ] ) {
269- console . log ( "" ) ;
270- console . log (
271- "`browser-ui-test` crashed unexpectedly. Please try again with adding `--test-args \
272- --no-sandbox` at the end. For example: `x.py test tests/rustdoc-gui --test-args --no-sandbox`" ) ;
273- console . log ( "" ) ;
274- }
275- } ;
276- process . on ( "exit" , exitHandling ) ;
277-
278257const originalFilesLen = files . length ;
279258const results = createEmptyResults ( ) ;
280259const status_bar = char_printer ( files . length ) ;
@@ -299,9 +278,6 @@ async function main(argv) {
299278Array . prototype . push . apply ( results . failed , new_results . failed ) ;
300279Array . prototype . push . apply ( results . errored , new_results . errored ) ;
301280
302- // We don't need this listener anymore.
303- process . removeListener ( "exit" , exitHandling ) ;
304-
305281if ( debug ) {
306282results . successful . sort ( by_filename ) ;
307283results . successful . forEach ( r => {
0 commit comments