tor-browser

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

browser_application_panel_telemetry-select-page.js (869B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 add_task(async function () {
      7  await enableApplicationPanel();
      8 
      9  const TAB_URL = URL_ROOT + "resources/service-workers/empty.html";
     10  const { panel, tab, commands } = await openNewTabAndApplicationPanel(TAB_URL);
     11  const doc = panel.panelWin.document;
     12 
     13  setupTelemetryTest();
     14 
     15  // make sure the default page is opened and then select a different one
     16  await waitUntil(() => doc.querySelector(".js-service-workers-page") !== null);
     17  ok(true, "Service Workers page was loaded per default.");
     18  selectPage(panel, "manifest");
     19 
     20  checkTelemetryEvent({ method: "select_page", page_type: "manifest" });
     21 
     22  // close the tab
     23  info("Closing the tab.");
     24  await commands.client.waitForRequestsToSettle();
     25  await BrowserTestUtils.removeTab(tab);
     26 });