mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 21:06:09 +00:00
fix: forward Steam maintenance navigation
This commit is contained in:
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))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user