Files
electron/spec/fixtures/api/close.html
Samuel Attard 7d31ad9297 test: write unload/close fixture output to per-test tmp paths
close.html and unload.html previously wrote to __dirname + '/close'|'/unload'
inside spec/fixtures/api/ itself. Pass the output path via ?out= query param
and use a pid+timestamp tmp file so parallel workers and retries never race.
2026-04-13 00:59:24 -07:00

12 lines
309 B
HTML

<html>
<body>
<script type="text/javascript" charset="utf-8">
window.addEventListener('unload', function (e) {
const out = new URLSearchParams(location.search).get('out');
require('node:fs').writeFileSync(out, 'close');
}, false);
window.onload = () => window.close();
</script>
</body>
</html>