fix(windows): keep browser close marker URL absolute (#12038)
This commit is contained in:
parent
8ab85c9bfc
commit
9db4cde93b
|
|
@ -147,6 +147,12 @@ describe('createMainWindow', () => {
|
|||
expect(browserWindowInstance.loadURL).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('keeps the browser close-policy marker absolute under Windows URL rules', () => {
|
||||
expect(fileURLToPath(BROWSER_WINDOW_CLOSE_ALLOWED_PRELOAD, { windows: true })).toBe(
|
||||
'C:\\__orca_window_close_allowed__'
|
||||
)
|
||||
})
|
||||
|
||||
it('enables renderer sandboxing and opens external links safely', () => {
|
||||
const windowHandlers: Record<string, (...args: any[]) => void> = {}
|
||||
const webContents = {
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
// Why: this marker carries the CLI's explicit close policy across <webview> attach before the guest exists.
|
||||
export const BROWSER_WINDOW_CLOSE_ALLOWED_PRELOAD = 'file:///__orca_window_close_allowed__'
|
||||
// Why: the synthetic drive keeps this marker absolute under Windows file-URL rules; main removes it before guest load.
|
||||
export const BROWSER_WINDOW_CLOSE_ALLOWED_PRELOAD = 'file:///C:/__orca_window_close_allowed__'
|
||||
|
|
|
|||
Loading…
Reference in New Issue