Files
desktop/src/testing/mochitest/browser-test-js.patch

31 lines
1.4 KiB
C++

diff --git a/testing/mochitest/browser-test.js b/testing/mochitest/browser-test.js
index 1e1fa8146450e3e09706180b85633cc87ddf6269..acbcefa6533d6bf909a767899b280592d3b0efda 100644
--- a/testing/mochitest/browser-test.js
+++ b/testing/mochitest/browser-test.js
@@ -442,10 +442,10 @@ Tester.prototype = {
// But not the Thunderbird window, it doesn't have these things!
if (AppConstants.MOZ_APP_NAME != "thunderbird") {
// Remove stale tabs
- if (this.currentTest && window.gBrowser && gBrowser.tabs.length > 1) {
+ if (this.currentTest && window.gBrowser && gBrowser.tabs.length > 2) {
let lastURI = "";
let lastURIcount = 0;
- while (gBrowser.tabs.length > 1) {
+ while (gBrowser.tabs.length > 2) {
let lastTab = gBrowser.tabs[gBrowser.tabs.length - 1];
if (!lastTab.closing) {
// Report the stale tab as an error only when they're not closing.
@@ -1151,12 +1151,6 @@ Tester.prototype = {
// test_end is logged, otherwise the new windows created by addTab will be
// tracked by ShutdownLeaks as belonging to the test and cause false leak reports.
if (window.gBrowser) {
- gBrowser.addTab("about:blank", {
- skipAnimation: true,
- triggeringPrincipal:
- Services.scriptSecurityManager.getSystemPrincipal(),
- });
- gBrowser.removeTab(gBrowser.selectedTab, { skipPermitUnload: true });
gBrowser.stop();
}