Bug 985412 - Don't fail when FrameWorker.jsm raises legitimate async errors. r=mixedpuppy, a=test-only
authorDavid Rajchenbach-Teller <dteller@mozilla.com>
Wed, 02 Apr 2014 05:59:00 -0400
changeset 199028 7828dcba0865eb231d4fb290b5fbd29cad76667f
parent 199027 52e55162615d9608bdff35ca9a7013db433f0280
child 199029 63f597d07af6f623dc632d7fb494b48bd960bd23
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy, test-only
bugs985412
milestone31.0a2
Bug 985412 - Don't fail when FrameWorker.jsm raises legitimate async errors. r=mixedpuppy, a=test-only
browser/base/content/test/social/browser_social_workercrash.js
--- a/browser/base/content/test/social/browser_social_workercrash.js
+++ b/browser/base/content/test/social/browser_social_workercrash.js
@@ -4,23 +4,27 @@
 
 // This tests our recovery if a child content process hosting providers
 // crashes.
 
 // A content script we inject into one of our browsers
 const TEST_CONTENT_HELPER = "chrome://mochitests/content/browser/browser/base/content/test/social/social_crash_content_helper.js";
 
 let {getFrameWorkerHandle} = Cu.import("resource://gre/modules/FrameWorker.jsm", {});
+let {Promise} = Cu.import("resource://gre/modules/Promise.jsm", {}).Promise;
 
 function test() {
   waitForExplicitFinish();
 
   // We need to ensure all our workers are in the same content process.
   Services.prefs.setIntPref("dom.ipc.processCount", 1);
 
+  // This test generates many uncaught promises that should not cause failures.
+  Promise.Debugging.clearUncaughtErrorObservers();
+
   runSocialTestWithProvider(gProviders, function (finishcb) {
     runSocialTests(tests, undefined, undefined, function() {
       Services.prefs.clearUserPref("dom.ipc.processCount");
       finishcb();
     });
   });
 }