File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -339,11 +339,18 @@ def configure_test_browser():
339339 if not shutil .which (EMTEST_BROWSER ):
340340 EMTEST_BROWSER = 'firefox'
341341 if not shutil .which (EMTEST_BROWSER ):
342+ # FIXME: This should really be an error, but this code currently also runs for non-browser tests.
343+ EMTEST_BROWSER = 'default-browser-not-found'
344+
342345 if MACOS and os .path .isdir ('/Applications/Safari.app' ):
343346 EMTEST_BROWSER = '/Applications/Safari.app'
344- else :
345- # FIXME: This should really be and error, but this code currently also runs for non-browser tests.
346- EMTEST_BROWSER = 'default-browser-not-found'
347+ elif WINDOWS :
348+ for browser in [
349+ f'{ os .getenv ("ProgramFiles(x86)" , "" )} \\ Microsoft\\ Edge\\ Application\\ msedge.exe' ,
350+ f'{ os .getenv ("ProgramFiles" , "" )} \\ Mozilla Firefox\\ firefox.exe' ,
351+ f'{ os .getenv ("LOCALAPPDATA" , "" )} \\ Google\\ Chrome SxS\\ Application\\ chrome.exe' ]:
352+ if os .path .isfile (browser ):
353+ EMTEST_BROWSER = browser
347354
348355 if WINDOWS and '"' not in EMTEST_BROWSER and "'" not in EMTEST_BROWSER :
349356 # On Windows env. vars canonically use backslashes as directory delimiters, e.g.
You can’t perform that action at this time.
0 commit comments