tor-browser

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

browser_toolbox_ready.js (638B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 * http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 const TEST_URL = "data:text/html,test for toolbox being ready";
      5 
      6 add_task(async function () {
      7  const tab = await addTab(TEST_URL);
      8 
      9  const toolbox = await gDevTools.showToolboxForTab(tab, {
     10    toolId: "webconsole",
     11  });
     12  ok(toolbox.isReady, "toolbox isReady is set");
     13  ok(toolbox.threadFront, "toolbox has a thread front");
     14 
     15  const toolbox2 = await gDevTools.showToolboxForTab(tab, {
     16    toolId: toolbox.toolId,
     17  });
     18  is(toolbox2, toolbox, "same toolbox");
     19 
     20  await toolbox.destroy();
     21  gBrowser.removeCurrentTab();
     22 });