fix: forward Steam maintenance navigation

This commit is contained in:
Kurt Himebauch committed 2026-10-28 17:50:58 -04:00
1 parent 2229dbc0a8
commit 48ad5506b6
7 files changed
+92 -2

No files matched your search

@@ -0,0 +1,23 @@
package com.droiddeck.launcher.session
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
class SteamSessionUrlTest {
@Test
fun onlySupportedSteamNavigationRoutesAreAccepted() {
listOf("steam://open/downloads", "steam://nav/library", "steam://uninstall/12345")
.forEach { assertTrue(it, SteamSessionUrl.isSupported(it)) }
listOf("steam://open/settings", "steam://uninstall/0", "steam://uninstall/01",
"steam://open/downloads\n--exec", "https://example.com")
.forEach { assertFalse(it, SteamSessionUrl.isSupported(it)) }
}
@Test
fun bridgeMustConfirmLaunch() {
assertTrue(SteamSessionUrl.wasOpened(ok = true, launched = true))
assertFalse(SteamSessionUrl.wasOpened(ok = false, launched = true))
assertFalse(SteamSessionUrl.wasOpened(ok = true, launched = false))
}
}