Debian Codegraph @

js/src/tests/non262/ShadowRealms/interrupt-request.js

raw
1 // |reftest| shell-option(--enable-shadow-realms) skip-if(!xulRuntime.shell)
2
3 // Request interrupt from shadow realm evaluation.
4
5 expectExitCode(6);
6
7 new ShadowRealm().evaluate(`
8 (interruptIf => {
9 interruptIf(true);
10
11 for (;;) {} // Wait for interrupt.
12 });
13 `)(interruptIf);
14
15 if (typeof reportCompare === 'function')
16 reportCompare(true, true);