mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 16:02:50 +00:00
test(mobile-web): pin the Android bridge URL guard after the compile fix
The Kotlin compile fix replaced the android.net.Uri origin check in MobileWebBridgeDocumentUrl with a JVM-testable host projection and hoisted activeSessionId into a local; the source-parity assertions still named the old spellings. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
This commit is contained in:
@@ -70,7 +70,8 @@ describe('mobile web native bridge transport', () => {
|
||||
expect(androidSource).toContain(
|
||||
'!isAllowedMobileWebBridgeDocumentUrl(documentUrl.toString(), sessionId)'
|
||||
)
|
||||
expect(androidBridgeUrlSource).toContain('isMobileWebOriginForSession(url, sessionId)')
|
||||
expect(androidBridgeUrlSource).toContain('url.scheme == MOBILE_WEB_ORIGIN_SCHEME')
|
||||
expect(androidBridgeUrlSource).toContain('url.host == mobileWebOriginHostForSession(sessionId)')
|
||||
expect(androidBridgeUrlSource).toContain('url.fragment == sessionId')
|
||||
expect(androidBridgeUrlSource).toContain('url.userInfo == null')
|
||||
expect(androidSource).toContain('request.isForMainFrame && isAllowedDocumentUrl(url)')
|
||||
|
||||
@@ -50,7 +50,8 @@ describe('mobile web shell root route', () => {
|
||||
expect(androidShellViewSource).toContain('url.path == "/"')
|
||||
expect(androidShellViewSource).toContain('url.encodedPath == "/"')
|
||||
expect(androidShellViewSource).toContain('url.query == null')
|
||||
expect(androidShellViewSource).toContain('url.fragment == activeSessionId')
|
||||
expect(androidShellViewSource).toContain('val sessionId = activeSessionId ?: return false')
|
||||
expect(androidShellViewSource).toContain('url.fragment == sessionId &&')
|
||||
expect(androidPackageStoreSource).toContain(
|
||||
'"url" to "${mobileWebOriginForSession(sessionId)}/#$sessionId"'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user