()
| 78 | |
| 79 | |
| 80 | def downloaded_chrome_binary_path(): |
| 81 | machine = platform.machine().lower() |
| 82 | arch = 'arm64' if machine in ('arm64', 'aarch64') else 'x64' |
| 83 | |
| 84 | paths = { |
| 85 | 'linux': |
| 86 | path.join('chrome-linux', 'chrome-linux64', 'chrome'), |
| 87 | 'darwin': |
| 88 | path.join( |
| 89 | f'chrome-mac-{arch}', |
| 90 | f'chrome-mac-{arch}', |
| 91 | 'Google Chrome for Testing.app', |
| 92 | 'Contents', |
| 93 | 'MacOS', |
| 94 | 'Google Chrome for Testing', |
| 95 | ), |
| 96 | 'win32': |
| 97 | path.join('chrome-win', 'chrome-win64', 'chrome.exe'), |
| 98 | } |
| 99 | |
| 100 | current_os = sys.platform |
| 101 | if current_os.startswith('linux'): |
| 102 | current_os = 'linux' |
| 103 | |
| 104 | if current_os not in paths: |
| 105 | raise NotImplementedError(f"OS {current_os} is not supported.") |
| 106 | |
| 107 | return path.join(devtools_root_path(), 'third_party', 'chrome', |
| 108 | paths[current_os]) |
nothing calls this directly
no test coverage detected