From 9004966da6491b368d12abeeb175256eedb78a2a Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Sun, 8 Nov 2026 15:10:48 +0000 Subject: navigate: do not require the debugger Attaching first (for the Leave-site prompt) made chrome_navigate fail on a tab whose page holds another extension's frame, such as a 1Password inline prompt, which is exactly when navigating away is the way out. Attach is now best effort. --- test-suite/unit/leave-site-prompt.test.mjs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test-suite') diff --git a/test-suite/unit/leave-site-prompt.test.mjs b/test-suite/unit/leave-site-prompt.test.mjs index 417d0b0..63d844a 100644 --- a/test-suite/unit/leave-site-prompt.test.mjs +++ b/test-suite/unit/leave-site-prompt.test.mjs @@ -99,3 +99,10 @@ test("the tool and the primer tell the agent what the prompt is and when to leav assert.match(src, /ask the user, because leaving discards unsaved work for good/); assert.match(src, /9\. A page can open dialogs you cannot see/); }); + +test("a tab the debugger cannot attach to (another extension's frame) still navigates", async () => { + const { w } = worker(undefined); + w.attachDebugger = async () => { throw new Error("Cannot access a chrome-extension:// URL of different extension"); }; + const result = await w.dispatch("page.navigate", { url: "https://other.test/", timeoutMs: 5000 }); + assert.equal(result.id, 2); +}); -- cgit v1.2.3