MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / downloaded_chrome_binary_path

Function downloaded_chrome_binary_path

scripts/devtools_paths.py:80–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78
79
80def 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])

Callers

nothing calls this directly

Calls 2

devtools_root_pathFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected