mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 16:03:20 +00:00
fix(windows): keep browser close marker URL absolute (#12038)
(cherry picked from commit 9db4cde93b)
This commit is contained in:
@@ -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__'
|
||||
|
||||
Reference in New Issue
Block a user