From ea54c74c505c57967fbbcdc4583a1639234dc3d5 Mon Sep 17 00:00:00 2001 From: David Rajchenbach-Teller Date: Sat, 4 Oct 2014 14:17:00 +0200 Subject: [PATCH] Bug 1016387 - Whitelisting tests that leak Promise rejections. r=ted --- .../base/content/test/general/browser_aboutAccounts.js | 7 +++++++ browser/base/content/test/general/browser_aboutHome.js | 8 ++++++++ .../general/browser_aboutSupport_newtab_security_state.js | 8 ++++++++ browser/base/content/test/general/browser_scope.js | 7 +++++++ browser/base/content/test/general/browser_zbug569342.js | 7 +++++++ .../base/content/test/social/browser_social_activation.js | 8 ++++++++ 6 files changed, 45 insertions(+) diff --git a/browser/base/content/test/general/browser_aboutAccounts.js b/browser/base/content/test/general/browser_aboutAccounts.js index 836be22de04..dd5b020f60c 100644 --- a/browser/base/content/test/general/browser_aboutAccounts.js +++ b/browser/base/content/test/general/browser_aboutAccounts.js @@ -2,6 +2,13 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ +/////////////////// +// +// Whitelisting this test. +// As part of bug 1077403, the leaking uncaught rejection should be fixed. +// +thisTestLeaksUncaughtRejectionsAndShouldBeFixed("TypeError: window.location is null"); + XPCOMUtils.defineLazyModuleGetter(this, "Promise", "resource://gre/modules/Promise.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Task", diff --git a/browser/base/content/test/general/browser_aboutHome.js b/browser/base/content/test/general/browser_aboutHome.js index 4be475055af..3658b89bf56 100644 --- a/browser/base/content/test/general/browser_aboutHome.js +++ b/browser/base/content/test/general/browser_aboutHome.js @@ -2,6 +2,14 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ +/////////////////// +// +// Whitelisting this test. +// As part of bug 1077403, the leaking uncaught rejection should be fixed. +// +thisTestLeaksUncaughtRejectionsAndShouldBeFixed("TypeError: Assert is null"); + + XPCOMUtils.defineLazyModuleGetter(this, "Promise", "resource://gre/modules/Promise.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Task", diff --git a/browser/base/content/test/general/browser_aboutSupport_newtab_security_state.js b/browser/base/content/test/general/browser_aboutSupport_newtab_security_state.js index 0316cf926f1..596721cad3b 100644 --- a/browser/base/content/test/general/browser_aboutSupport_newtab_security_state.js +++ b/browser/base/content/test/general/browser_aboutSupport_newtab_security_state.js @@ -1,6 +1,14 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ +/////////////////// +// +// Whitelisting this test. +// As part of bug 1077403, the leaking uncaught rejection should be fixed. +// +thisTestLeaksUncaughtRejectionsAndShouldBeFixed("TypeError: window.location is null"); + + add_task(function* checkIdentityOfAboutSupport() { let tab = gBrowser.loadOneTab("about:support", { referrerURI: null, diff --git a/browser/base/content/test/general/browser_scope.js b/browser/base/content/test/general/browser_scope.js index e4edac1e044..30ef9d4961e 100644 --- a/browser/base/content/test/general/browser_scope.js +++ b/browser/base/content/test/general/browser_scope.js @@ -1,3 +1,10 @@ +/////////////////// +// +// Whitelisting this test. +// As part of bug 1077403, the leaking uncaught rejection should be fixed. +// +thisTestLeaksUncaughtRejectionsAndShouldBeFixed("TypeError: this.docShell is null"); + function test() { ok(!!gBrowser, "gBrowser exists"); is(gBrowser, getBrowser(), "both ways of getting tabbrowser work"); diff --git a/browser/base/content/test/general/browser_zbug569342.js b/browser/base/content/test/general/browser_zbug569342.js index 564cff447c4..321663543db 100644 --- a/browser/base/content/test/general/browser_zbug569342.js +++ b/browser/base/content/test/general/browser_zbug569342.js @@ -2,6 +2,13 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ +/////////////////// +// +// Whitelisting this test. +// As part of bug 1077403, the leaking uncaught rejection should be fixed. +// +thisTestLeaksUncaughtRejectionsAndShouldBeFixed(""); + var gTab = null; function load(url, cb) { diff --git a/browser/base/content/test/social/browser_social_activation.js b/browser/base/content/test/social/browser_social_activation.js index be9c93537aa..57c50a52ea2 100644 --- a/browser/base/content/test/social/browser_social_activation.js +++ b/browser/base/content/test/social/browser_social_activation.js @@ -2,6 +2,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +/////////////////// +// +// Whitelisting this test. +// As part of bug 1077403, the leaking uncaught rejection should be fixed. +// +thisTestLeaksUncaughtRejectionsAndShouldBeFixed("TypeError: Assert is null"); + + let SocialService = Cu.import("resource://gre/modules/SocialService.jsm", {}).SocialService; let tabsToRemove = [];