Bug 1498102 - Add a rejection handler to another promise chain in the test which was forgotten in the previous debugging patch
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 15 Oct 2018 10:06:53 -0400
changeset 489560 78add290fb096999f15edf658aa4026c197ed366
parent 489558 4f99223da02146842694203124351f21b96dec5a
child 489561 c0b3c3c948fde682b37efa237235248aeb1f7ec2
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
bugs1498102
milestone64.0a1
Bug 1498102 - Add a rejection handler to another promise chain in the test which was forgotten in the previous debugging patch
toolkit/components/antitracking/test/browser/browser_blockingServiceWorkers.js
--- a/toolkit/components/antitracking/test/browser/browser_blockingServiceWorkers.js
+++ b/toolkit/components/antitracking/test/browser/browser_blockingServiceWorkers.js
@@ -1,15 +1,16 @@
 requestLongerTimeout(2);
 
 AntiTracking.runTest("ServiceWorkers",
   async _ => {
     await navigator.serviceWorker.register("empty.js").then(
       _ => { ok(false, "ServiceWorker cannot be used!"); },
-      _ => { ok(true, "ServiceWorker cannot be used!"); });
+      _ => { ok(true, "ServiceWorker cannot be used!"); }).
+      catch(e => ok(false, "Promise rejected: " + e));
   },
   null,
   async _ => {
     await new Promise(resolve => {
       Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => resolve());
     });
   },
   [["dom.serviceWorkers.exemptFromPerDomainMax", true],