tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

jobqueue-interrupt-01.js (427B)


      1 // catchTermination should undo the quit() operation and let the remaining jobs
      2 // run.
      3 
      4 evaluate(`
      5  quit();
      6 `, {
      7  catchTermination : true
      8 });
      9 
     10 const global = newGlobal({ newCompartment: true });
     11 
     12 let called = false;
     13 const dbg = new Debugger(global);
     14 dbg.onDebuggerStatement = function (frame) {
     15  Promise.resolve(42).then(v => { called = true; });
     16 };
     17 global.eval(`
     18  debugger;
     19 `);
     20 
     21 drainJobQueue();
     22 
     23 assertEq(called, true);