tor-browser

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

test_new_source-01.js (553B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 /**
      7 * Check basic newSource packet sent from server.
      8 */
      9 
     10 add_task(
     11  threadFrontTest(async ({ threadFront, debuggee }) => {
     12    Cu.evalInSandbox(
     13      function inc(n) {
     14        return n + 1;
     15      }.toString(),
     16      debuggee
     17    );
     18 
     19    const sourcePacket = await waitForEvent(threadFront, "newSource");
     20 
     21    Assert.ok(!!sourcePacket.source);
     22    Assert.ok(!!sourcePacket.source.url.match(/test_new_source-01.js$/));
     23  })
     24 );