Bug 1519455 - Fix browser_service_workers_push.js for sw-e10s refactor;r=daisuke
authorJulian Descottes <jdescottes@mozilla.com>
Wed, 13 Feb 2019 07:54:47 +0000
changeset 458858 e5f3e1584cf9
parent 458853 93e37c529818
child 458859 23fa2fb048b9
push id35551
push usershindli@mozilla.com
push dateWed, 13 Feb 2019 21:34:09 +0000
treeherdermozilla-central@08f794a4928e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdaisuke
bugs1519455
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1519455 - Fix browser_service_workers_push.js for sw-e10s refactor;r=daisuke Differential Revision: https://phabricator.services.mozilla.com/D19466
devtools/client/aboutdebugging/test/browser_service_workers_push.js
--- a/devtools/client/aboutdebugging/test/browser_service_workers_push.js
+++ b/devtools/client/aboutdebugging/test/browser_service_workers_push.js
@@ -41,16 +41,21 @@ add_task(async function() {
 
   info("Ensure that the registration resolved before trying to interact with " +
     "the service worker.");
   await waitForServiceWorkerRegistered(swTab);
   ok(true, "Service worker registration resolved");
 
   await waitForServiceWorkerActivation(SERVICE_WORKER, document);
 
+  info("Wait until the service worker is running");
+  const container = await waitUntilServiceWorkerContainer(SERVICE_WORKER, document);
+  await waitUntil(
+    () => container.querySelector(".target-status").textContent === "Running", 100);
+
   // Retrieve the Push button for the worker.
   const names = [...document.querySelectorAll("#service-workers .target-name")];
   const name = names.filter(element => element.textContent === SERVICE_WORKER)[0];
   ok(name, "Found the service worker in the list");
 
   const targetElement = name.parentNode.parentNode;
 
   const pushBtn = targetElement.querySelector(".push-button");