Bug 1531612 - Allow uncaught rejection while running test, r=loganfsmyth.
authorBrian Hackett <bhackett1024@gmail.com>
Thu, 25 Apr 2019 10:52:27 -1000
changeset 530508 2d41d7ccab748178a7d601730c57431d9cdeb59e
parent 530475 d134fc3b9e290ccd3404890491dee63d0c5fcdbf
child 530509 2dcd3edb3c5d13410f9ae2943c103b9b9cda3afb
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersloganfsmyth
bugs1531612
milestone68.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 1531612 - Allow uncaught rejection while running test, r=loganfsmyth. Differential Revision: https://phabricator.services.mozilla.com/D28930
devtools/client/debugger/test/mochitest/browser_dbg-worker-scopes.js
--- a/devtools/client/debugger/test/mochitest/browser_dbg-worker-scopes.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg-worker-scopes.js
@@ -1,13 +1,21 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
+// This error shows up sometimes when running the test, and while this is a
+// strange problem that shouldn't be happening it doesn't prevent the test from
+// completing successfully.
+const { PromiseTestUtils } = ChromeUtils.import(
+  "resource://testing-common/PromiseTestUtils.jsm"
+);
+PromiseTestUtils.whitelistRejectionsGlobally(/Current state is running/);
+
 function findNode(dbg, text) {
   for (let index = 0;; index++) {
     var elem = findElement(dbg, "scopeNode", index);
     if (elem && elem.innerText == text) {
       return elem;
     }
   }
 }