diff options
Diffstat (limited to 'devtools/client/application/test/browser/browser_application_panel_list-workers-empty.js')
-rw-r--r-- | devtools/client/application/test/browser/browser_application_panel_list-workers-empty.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/devtools/client/application/test/browser/browser_application_panel_list-workers-empty.js b/devtools/client/application/test/browser/browser_application_panel_list-workers-empty.js new file mode 100644 index 0000000000..1bb75d2999 --- /dev/null +++ b/devtools/client/application/test/browser/browser_application_panel_list-workers-empty.js @@ -0,0 +1,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); +}); |