Harden Chrome bridge framing and preserve panel state for IDE beta 7

This commit is contained in:
yilsem committed 2026-09-07 12:50:15 +03:00
1 parent fb6f57cd36
commit 57876d11f0
8 files changed
+192 -18

No files matched your search

+7 -5
View File
@@ -147,11 +147,13 @@ test('Windows named pipe requires separate capability, native host frames Turkis
const stop = await startChromeBridge({ directory, resolveBackend: f.resolve })
t.after(stop)
const discovery = JSON.parse(await readFile(join(directory, 'chrome-bridge.json'), 'utf8'))
const bad = connect(`\\\\.\\pipe\\${discovery.pipe}`)
await once(bad, 'connect')
const closed = once(bad, 'close')
bad.write(JSON.stringify({ token: 'x'.repeat(64) }) + '\n')
await closed
for (const hello of [null, { token: 'x'.repeat(64) }, { token: 'ı'.repeat(64) }, {}]) {
const bad = connect(`\\\\.\\pipe\\${discovery.pipe}`)
await once(bad, 'connect')
const closed = once(bad, 'close')
bad.write(JSON.stringify(hello) + '\n')
await closed
}
const child = spawn(process.env.AITURK_TEST_NATIVE_HOST,
['chrome-extension://ikcplfhgapaabedillejmggjcabpkolp/'],
{ env: { ...process.env, LOCALAPPDATA: local }, windowsHide: true, stdio: ['pipe', 'pipe', 'pipe'] })