/** * The jailed browser launch path starts Chromium with `--no-sandbox` (task * 4.10 interim, celilo#1215). * * The behavioural proof lives in `hook-jail-toolchain-reach.test.ts`: with its * own sandbox on, Chromium does not start inside the bubblewrap jail; with * `--no-sandbox` it renders. But that run needs `CELILO_PROBE_BROWSER`, so on * an ordinary host it reports "no browser supplied" and nothing would fail if * the flag were dropped from the launcher. This suite is the pin that always * runs: it asserts the launch args the probe hook actually uses, and it fails * the moment `--no-sandbox` leaves the launch path. */ import { describe, expect, test } from 'bun:test'; import { JAILED_LAUNCH_ARGS, SANDBOXED_LAUNCH_ARGS } from './test-fixtures/jail-toolchain-hook'; describe('jailed browser launch flags (4.10 interim, celilo#1215)', () => { test('the jailed launch path carries --no-sandbox', () => { expect(JAILED_LAUNCH_ARGS).toContain('--no-sandbox'); }); test('the experiment arm keeps Chromium sandboxed, so the comparison stays controlled', () => { expect(SANDBOXED_LAUNCH_ARGS).not.toContain('--no-sandbox'); }); test('the two arms differ by the sandbox flag alone', () => { const onlyInJailed = JAILED_LAUNCH_ARGS.filter((arg) => !SANDBOXED_LAUNCH_ARGS.includes(arg)); const onlyInSandboxed = SANDBOXED_LAUNCH_ARGS.filter( (arg) => !JAILED_LAUNCH_ARGS.includes(arg), ); expect(onlyInJailed).toEqual(['--no-sandbox']); expect(onlyInSandboxed).toEqual([]); }); });