Bug 1596148 - Part 2: Re-enable start SW mochitest r=jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D53991

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Belén Albeza 2019-11-21 13:25:48 +00:00
Родитель ee4721a1c4
Коммит ba7e841092
3 изменённых файлов: 40 добавлений и 32 удалений

Просмотреть файл

@ -29,6 +29,8 @@ support-files =
[browser_application_panel_sidebar.js]
[browser_application_panel_debug-service-worker.js]
skip-if = debug || asan # Bug 1559591, 1575578
[browser_application_panel_disable-start-service-worker.js]
skip-if = (os == 'linux' && asan) || debug || serviceworker_e10s # Bug 1559487, 1559591, 1447197
[browser_application_panel_list-domain-workers.js]
skip-if = debug # Bug 1559591
[browser_application_panel_list-several-workers.js]
@ -47,4 +49,4 @@ skip-if = true # Bug 1467256, 1559591
[browser_application_panel_unregister-worker.js]
skip-if = debug # Bug 1559591
[browser_application_panel_start-service-worker.js]
skip-if = (os == 'linux' && asan) || debug || serviceworker_e10s # Bug 1559487, 1559591, 1447197
skip-if = (os == 'linux' && asan) || debug # Bug 1559487, 1559591, 1447197

Просмотреть файл

@ -0,0 +1,37 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const TAB_URL = URL_ROOT + "resources/service-workers/simple.html";
/**
* Tests that Start button is disabled for service workers, when they cannot be debugged
*/
add_task(async function() {
await enableApplicationPanel();
// disable sw debugging by increasing the # of processes and thus multi-e10s kicking in
info("Disable service worker debugging");
await pushPref("dom.ipc.processCount", 8);
const { panel, tab, target } = await openNewTabAndApplicationPanel(TAB_URL);
const doc = panel.panelWin.document;
selectPage(panel, "service-workers");
await waitForWorkerRegistration(tab);
info("Wait until the service worker appears in the application panel");
await waitUntil(() => getWorkerContainers(doc).length === 1);
info("Wait until the start button is displayed");
const container = getWorkerContainers(doc)[0];
await waitUntil(() => container.querySelector(".js-start-button"));
ok(
container.querySelector(".js-start-button").disabled,
"Start button is disabled"
);
await unregisterAllWorkers(target.client);
});

Просмотреть файл

@ -48,34 +48,3 @@ add_task(async function() {
await unregisterAllWorkers(target.client);
});
/**
* Tests that Start button is disabled for service workers, when they cannot be debugged
*/
add_task(async function() {
await enableApplicationPanel();
// disable sw debugging by increasing the # of processes and thus multi-e10s kicking in
info("Disable service worker debugging");
await pushPref("dom.ipc.processCount", 8);
const { panel, tab, target } = await openNewTabAndApplicationPanel(TAB_URL);
const doc = panel.panelWin.document;
selectPage(panel, "service-workers");
await waitForWorkerRegistration(tab);
info("Wait until the service worker appears in the application panel");
await waitUntil(() => getWorkerContainers(doc).length === 1);
info("Wait until the start button is displayed");
const container = getWorkerContainers(doc)[0];
await waitUntil(() => container.querySelector(".js-start-button"));
ok(
container.querySelector(".js-start-button").disabled,
"Start button is disabled"
);
await unregisterAllWorkers(target.client);
});