summaryrefslogtreecommitdiffstats
path: root/devtools/client/application/test/browser/browser_application_panel_list-workers-empty.js
blob: 1bb75d2999f38f70661029c465d091a30086554b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

/**
 * Check that the application panel only displays service workers from the
 * current domain.
 */

const EMPTY_URL = URL_ROOT + "resources/service-workers/empty.html";

add_task(async function () {
  await enableApplicationPanel();

  const { panel, tab } = await openNewTabAndApplicationPanel(EMPTY_URL);
  const doc = panel.panelWin.document;

  selectPage(panel, "service-workers");

  await waitUntil(
    () => doc.querySelector(".js-registration-list-empty") !== null
  );
  ok(true, "No service workers are shown for an empty page");

  // close the tab
  info("Closing the tab.");
  await BrowserTestUtils.removeTab(tab);
});