Files
orca/tests/tools/benchmarks/spinner-rendering/main.ts
T
Neil e1d4314a46 refactor(window): organize clipboard, lifecycle, security, and relay owners (#41634)
* refactor(window): group clipboard, lifecycle, security, and relay owners

* refactor(window): keep Electron paste handling with desktop clipboard
2026-11-12 11:47:00 -08:00

23 lines
844 B
TypeScript

import { app, BrowserWindow } from 'electron'
import path from 'node:path'
import { applyBackgroundActivationPolicy } from '../../../../src/main/window/activation/foreground-activation-policy'
if (process.env.ORCA_BACKGROUND_LAUNCH !== '1') {
throw new Error('Spinner measurements require ORCA_BACKGROUND_LAUNCH=1')
}
app.setPath('userData', path.join(__dirname, 'profile'))
applyBackgroundActivationPolicy()
// Exercise the frame pipeline while keeping the native window hidden.
app.commandLine.appendSwitch('disable-backgrounding-occluded-windows')
app.commandLine.appendSwitch('disable-renderer-backgrounding')
void app.whenReady().then(async () => {
const window = new BrowserWindow({
show: false,
width: 1100,
height: 850,
webPreferences: { backgroundThrottling: false }
})
await window.loadURL('about:blank')
})