Bug 1580826 - Ensure awaiting on fetchManifest before closing tab, r=yulia
authorOla Gasidlo <ogasidlo@mozilla.com>
Mon, 16 Sep 2019 11:55:50 +0000
changeset 493357 d09edbe2abfec5298b39ab5b30d45bf20b8bbe33
parent 493356 da7b7424f3398d8995eac0c2ab544989bb333c05
child 493358 5873711a3f086b31b10bb57f9bd6e98bc456bfe6
push id114088
push usercsabou@mozilla.com
push dateMon, 16 Sep 2019 15:59:57 +0000
treeherdermozilla-inbound@d09edbe2abfe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyulia
bugs1580826
milestone71.0a1
first release with
nightly linux32
d09edbe2abfe / 71.0a1 / 20190916155843 / files
nightly linux64
d09edbe2abfe / 71.0a1 / 20190916155843 / files
nightly mac
d09edbe2abfe / 71.0a1 / 20190916155843 / files
nightly win32
d09edbe2abfe / 71.0a1 / 20190916155843 / files
nightly win64
d09edbe2abfe / 71.0a1 / 20190916155843 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1580826 - Ensure awaiting on fetchManifest before closing tab, r=yulia Intermittent devtools/client/application/test/browser/browser_application_panel_sidebar.js | A promise chain failed to handle a rejection: Connection closed, pending request to server0.conn2.child1/manifestActor19, type fetchCanonicalManifest failed Differential Revision: https://phabricator.services.mozilla.com/D46001
devtools/client/application/test/browser/browser_application_panel_sidebar.js
--- a/devtools/client/application/test/browser/browser_application_panel_sidebar.js
+++ b/devtools/client/application/test/browser/browser_application_panel_sidebar.js
@@ -6,28 +6,29 @@
 /**
  * Check that the manifest is being properly shown
  */
 
 add_task(async function() {
   info("Test that we are displaying correctly the sidebar");
 
   await enableApplicationPanel();
-  const { panel, tab } = await openNewTabAndApplicationPanel();
+  const { panel, tab, target } = await openNewTabAndApplicationPanel();
   const doc = panel.panelWin.document;
 
   info("Waiting for the sidebar to be displayed");
   await waitUntil(() => doc.querySelector(".js-sidebar") !== null);
   ok(true, "Sidebar is being displayed");
 
   await waitUntil(() => doc.querySelector(".js-manifest-page") !== null);
   ok(true, "Manifest page was loaded per default.");
 
   // close the tab
   info("Closing the tab.");
+  await target.client.waitForRequestsToSettle();
   await BrowserTestUtils.removeTab(tab);
 });
 
 add_task(async function() {
   info("Test that we are displaying correctly the selected page - manifest");
 
   await enableApplicationPanel();
   const { panel, tab, target } = await openNewTabAndApplicationPanel();
@@ -43,27 +44,28 @@ add_task(async function() {
 
   await waitUntil(() => doc.querySelector(".js-manifest-page") !== null);
   ok(true, "Manifest page was selected.");
 
   await unregisterAllWorkers(target.client);
 
   // close the tab
   info("Closing the tab.");
+  await target.client.waitForRequestsToSettle();
   await BrowserTestUtils.removeTab(tab);
 });
 
 add_task(async function() {
   info(
     "Test that we are displaying correctly the selected page - service workers"
   );
   const url = URL_ROOT + "resources/manifest/load-ok.html";
 
   await enableApplicationPanel();
-  const { panel, tab } = await openNewTabAndApplicationPanel(url);
+  const { panel, tab, target } = await openNewTabAndApplicationPanel(url);
   const doc = panel.panelWin.document;
 
   selectPage(panel, "manifest");
 
   info("Waiting for the manifest to load");
   await waitUntil(() => doc.querySelector(".js-manifest-page") !== null);
   ok(true, "Manifest page was selected.");
 
@@ -71,10 +73,11 @@ add_task(async function() {
   const link = doc.querySelector(".js-sidebar-service-workers");
   link.click();
 
   await waitUntil(() => doc.querySelector(".js-service-workers-page") !== null);
   ok(true, "Service workers page was selected.");
 
   // close the tab
   info("Closing the tab.");
+  await target.client.waitForRequestsToSettle();
   await BrowserTestUtils.removeTab(tab);
 });