tor-browser

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

test_frameactor-02.js (751B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 /**
      7 * Verify that two pauses in a row will keep the same frame actor.
      8 */
      9 
     10 add_task(
     11  threadFrontTest(async ({ threadFront, debuggee }) => {
     12    const packet1 = await executeOnNextTickAndWaitForPause(
     13      () => evalCode(debuggee),
     14      threadFront
     15    );
     16 
     17    const packet2 = await resumeAndWaitForPause(threadFront);
     18 
     19    Assert.equal(packet1.frame.actor, packet2.frame.actor);
     20    await threadFront.resume();
     21  })
     22 );
     23 
     24 function evalCode(debuggee) {
     25  debuggee.eval(
     26    "(" +
     27      function () {
     28        function stopMe() {
     29          debugger;
     30          debugger;
     31        }
     32        stopMe();
     33      } +
     34      ")()"
     35  );
     36 }