diff --git a/tests/cli/test_cli_browser_connect.py b/tests/cli/test_cli_browser_connect.py index 09d009ca751..b4523b3778d 100644 --- a/tests/cli/test_cli_browser_connect.py +++ b/tests/cli/test_cli_browser_connect.py @@ -160,6 +160,18 @@ class TestChromeDebugLaunch: assert command is not None assert command.startswith(f"{brave} --remote-debugging-port=9222") + def test_linux_candidates_include_brave_binary_name(self): + brave = "/usr/bin/brave" + + with patch("hermes_cli.browser_connect.shutil.which", side_effect=lambda name: brave if name == "brave" else None), \ + patch("hermes_cli.browser_connect.os.path.isfile", side_effect=lambda path: path == brave): + candidates = get_chrome_debug_candidates("Linux") + command = manual_chrome_debug_command(9222, "Linux") + + assert candidates == [brave] + assert command is not None + assert command.startswith(f"{brave} --remote-debugging-port=9222") + def test_linux_candidates_include_official_brave_and_edge_stable_paths(self): brave = "/usr/bin/brave-browser-stable" edge = "/usr/bin/microsoft-edge-stable"