From 0668d74d7fde66050fa00959431387ccfa77bb25 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Wed, 11 Nov 2026 01:07:49 -0800 Subject: [PATCH] test(browser): keep preview input fixture native-shaped --- ...wser-manager-workspace-doc-shortcuts.test.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/browser/guest-lifecycle/manager/registration/browser-manager-workspace-doc-shortcuts.test.ts b/src/main/browser/guest-lifecycle/manager/registration/browser-manager-workspace-doc-shortcuts.test.ts index bab2aa74f57..7f22d4609bc 100644 --- a/src/main/browser/guest-lifecycle/manager/registration/browser-manager-workspace-doc-shortcuts.test.ts +++ b/src/main/browser/guest-lifecycle/manager/registration/browser-manager-workspace-doc-shortcuts.test.ts @@ -42,13 +42,28 @@ describe('workspace document guest input', () => { browserPageId: 'doc-page-1' }) const url = buildDocPreviewUrl(grant.id, grant.entryRelativePath) - const guest = Object.assign(new DestroyedGuestTestContents(7), { getURL: () => url }) + const guest = Object.assign(new DestroyedGuestTestContents(7), { + getURL: () => url, + isCrashed: () => false + }) const send = vi.fn() const host = Object.assign(new DestroyedGuestTestContents(5001), { send }) new DestroyedGuestTestManager().attachGuestPolicies(guest.asWebContents(), null, { profile: 'workspace-doc', host: host.asWebContents() }) + expect(send.mock.calls).toEqual([ + [ + 'browser:guest-discard-protection-changed', + { + browserPageId: 'doc-page-1', + webContentsId: 7, + protection: 'unknown', + reason: 'observer' + } + ] + ]) + send.mockClear() guests.push(guest) return { guest, send } }