Fix Android startup defaults and window sizing

This commit is contained in:
Joe Julian
2026-03-30 07:30:06 -07:00
parent 794eed04d4
commit fca121f170
2 changed files with 46 additions and 6 deletions
+25
View File
@@ -2348,6 +2348,31 @@ func TestResolveFlagOrEnvPrefersFlagThenEnvThenFallback(t *testing.T) {
}
}
func TestDefaultModeForRuntimeUsesPhoneOnAndroid(t *testing.T) {
t.Parallel()
if got := defaultModeForRuntime("android"); got != "phone" {
t.Fatalf("defaultModeForRuntime(android) = %q, want %q", got, "phone")
}
if got := defaultModeForRuntime("linux"); got != "desktop" {
t.Fatalf("defaultModeForRuntime(linux) = %q, want %q", got, "desktop")
}
}
func TestShouldUsePreviewWindowSizeSkipsAndroid(t *testing.T) {
t.Parallel()
if got := shouldUsePreviewWindowSize("desktop", "android"); got {
t.Fatal("shouldUsePreviewWindowSize(desktop, android) = true, want false")
}
if got := shouldUsePreviewWindowSize("phone", "android"); got {
t.Fatal("shouldUsePreviewWindowSize(phone, android) = true, want false")
}
if got := shouldUsePreviewWindowSize("desktop", "linux"); !got {
t.Fatal("shouldUsePreviewWindowSize(desktop, linux) = false, want true")
}
}
func TestEnterOnLocalLifecycleScreenDefaultsToOpenVault(t *testing.T) {
t.Parallel()