tor-browser

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

test_HeapAnalyses_takeCensus_01.js (690B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 "use strict";
      4 
      5 // Test that the HeapAnalyses{Client,Worker} can take censuses.
      6 
      7 add_task(async function () {
      8  const client = new HeapAnalysesClient();
      9 
     10  const snapshotFilePath = saveNewHeapSnapshot();
     11  await client.readHeapSnapshot(snapshotFilePath);
     12  ok(true, "Should have read the heap snapshot");
     13 
     14  const { report } = await client.takeCensus(snapshotFilePath);
     15  ok(report, "Should get a report");
     16  equal(typeof report, "object", "report should be an object");
     17 
     18  ok(report.objects);
     19  ok(report.scripts);
     20  ok(report.strings);
     21  ok(report.other);
     22 
     23  client.destroy();
     24 });