@@ -19,7 +19,6 @@ function showHelp() {
1919 console . log ( " --debug : show extra information about script run" ) ;
2020 console . log ( " --show-text : render font in pages" ) ;
2121 console . log ( " --no-headless : disable headless mode" ) ;
22- console . log ( " --no-sandbox : disable sandbox mode" ) ;
2322 console . log ( " --help : show this message then quit" ) ;
2423 console . log ( " --tests-folder [PATH] : location of the .GOML tests folder" ) ;
2524 console . 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 } ;
4543 const 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
5552 for ( let i = 0 ; i < args . length ; ++ i ) {
@@ -80,9 +77,6 @@ function parseOptions(args) {
8077 } else if ( arg === "--help" ) {
8178 showHelp ( ) ;
8279 process . 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 ] ) {
8781 opts [ correspondences [ arg ] ] = true ;
8882 } else {
@@ -203,6 +197,7 @@ async function main(argv) {
203197 const 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 ] ;
207202 if ( opts [ "debug" ] ) {
208203 debug = true ;
@@ -211,9 +206,6 @@ async function main(argv) {
211206 if ( opts [ "show_text" ] ) {
212207 args . push ( "--show-text" ) ;
213208 }
214- if ( opts [ "no_sandbox" ] ) {
215- args . push ( "--no-sandbox" ) ;
216- }
217209 if ( opts [ "no_headless" ] ) {
218210 args . push ( "--no-headless" ) ;
219211 headless = false ;
@@ -262,19 +254,6 @@ async function main(argv) {
262254 console . 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-
278257 const originalFilesLen = files . length ;
279258 const results = createEmptyResults ( ) ;
280259 const status_bar = char_printer ( files . length ) ;
@@ -299,9 +278,6 @@ async function main(argv) {
299278 Array . prototype . push . apply ( results . failed , new_results . failed ) ;
300279 Array . prototype . push . apply ( results . errored , new_results . errored ) ;
301280
302- // We don't need this listener anymore.
303- process . removeListener ( "exit" , exitHandling ) ;
304-
305281 if ( debug ) {
306282 results . successful . sort ( by_filename ) ;
307283 results . successful . forEach ( r => {
0 commit comments