Fix Android startup defaults and window sizing
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user