fix(browser): cover internal helper ownership paths

This commit is contained in:
OrcaWin
2026-07-20 18:03:33 -07:00
parent 0f4a6c941c
commit dc9eea6807
3 changed files with 6 additions and 0 deletions
@@ -889,6 +889,8 @@ describe('AgentBrowserBridge', () => {
)
expect(routeCalls).toHaveLength(2)
expect(routeCalls.at(-1)).toContain('https://old.example/**')
expect(routeCalls.at(-1)).toContain('--cdp')
expect(routeCalls.at(-1)).toContain('9222')
})
it('clears stale sessions after direct CDP visibility re-registration', async () => {
+2
View File
@@ -2414,6 +2414,8 @@ export class AgentBrowserBridge {
await this.runAgentBrowserRaw(sessionName, [
'--session',
sessionName,
'--cdp',
String(session.proxy.getPort()),
'network',
'route',
urlPattern,
+2
View File
@@ -1059,6 +1059,8 @@ export type BrowserErrorCode =
| 'browser_no_tab'
| 'browser_tab_not_found'
| 'browser_tab_closed'
| 'browser_tab_changed'
| 'browser_owner_unavailable'
| 'browser_stale_ref'
| 'browser_ref_not_found'
| 'browser_navigation_failed'