feat: wire gui instance start and delete confirmation
This commit is contained in:
@@ -116,7 +116,10 @@ func BuildArgs(spec domain.LaunchSpec) ([]string, error) {
|
||||
}
|
||||
args = append(args, extra)
|
||||
}
|
||||
return append(args, normalized.TargetURL), nil
|
||||
if normalized.TargetURL != "" {
|
||||
args = append(args, normalized.TargetURL)
|
||||
}
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func normalizeProxy(value string) (string, error) {
|
||||
|
||||
@@ -48,6 +48,18 @@ func TestBuildArgsRejectsProxyCredentialsAndUnsupportedValues(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildArgsAllowsDefaultBrowserPage(t *testing.T) {
|
||||
profile := filepath.Join(t.TempDir(), "profile")
|
||||
args, err := BuildArgs(domain.LaunchSpec{Kind: domain.BrowserChrome, UserDataDir: profile})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
want := []string{"--user-data-dir=" + filepath.Clean(profile), "--no-first-run", "--disable-default-apps"}
|
||||
if !reflect.DeepEqual(args, want) {
|
||||
t.Fatalf("args = %#v, want %#v", args, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDiscovererResolvesConfiguredAndStandardPaths(t *testing.T) {
|
||||
root := t.TempDir()
|
||||
chrome := filepath.Join(root, `Google\Chrome\Application\chrome.exe`)
|
||||
|
||||
Reference in New Issue
Block a user