feat: add local cdp startup and external association

This commit is contained in:
QiuSW
2026-07-25 15:53:31 +08:00
parent 972c637716
commit 4063b851eb
17 changed files with 845 additions and 158 deletions
+10
View File
@@ -53,3 +53,13 @@ func TestLaunchSpecNormalizeAllowsAnEmptyTargetURL(t *testing.T) {
t.Fatalf("target URL = %q, want empty", normalized.TargetURL)
}
}
func TestLaunchSpecNormalizeRejectsInvalidRemoteDebugPort(t *testing.T) {
profile := filepath.Join(t.TempDir(), "profile")
for _, port := range []int{1, MinRemoteDebugPort - 1, MaxRemoteDebugPort + 1} {
_, err := (LaunchSpec{Kind: BrowserChrome, UserDataDir: profile, RemoteDebugPort: port}).Normalize()
if !errors.Is(err, ErrInvalidLaunchSpec) {
t.Errorf("port %d error = %v", port, err)
}
}
}