Bug 1658539 - Disable tab replacement in mochitests for Thunderbird. r=ahal

Differential Revision: https://phabricator.services.mozilla.com/D86697
This commit is contained in:
Mark Banner 2020-08-11 15:43:56 +00:00
Родитель cd9a620ede
Коммит 8b95c9a06f
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -383,7 +383,12 @@ Tester.prototype = {
: "Found an unexpected {elt}"; : "Found an unexpected {elt}";
// Remove stale tabs // Remove stale tabs
if (this.currentTest && window.gBrowser && gBrowser.tabs.length > 1) { if (
this.currentTest &&
window.gBrowser &&
AppConstants.MOZ_APP_NAME != "thunderbird" &&
gBrowser.tabs.length > 1
) {
while (gBrowser.tabs.length > 1) { while (gBrowser.tabs.length > 1) {
let lastTab = gBrowser.tabs[gBrowser.tabs.length - 1]; let lastTab = gBrowser.tabs[gBrowser.tabs.length - 1];
if (!lastTab.closing) { if (!lastTab.closing) {
@ -404,7 +409,7 @@ Tester.prototype = {
} }
// Replace the last tab with a fresh one // Replace the last tab with a fresh one
if (window.gBrowser) { if (window.gBrowser && AppConstants.MOZ_APP_NAME != "thunderbird") {
gBrowser.addTab("about:blank", { gBrowser.addTab("about:blank", {
skipAnimation: true, skipAnimation: true,
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(), triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),