Bug 670851 - browser_bug519216.js, browser_popupNotification.js and browser_library_middleclick.js cause exception in tabbrowser.xml. r=gavin

--HG--
extra : rebase_source : d9d307f97548425891d5899d058d58cac9c7f319
This commit is contained in:
Dão Gottwald 2011-07-13 02:46:50 +02:00
Родитель 5e60136747
Коммит dadf53c2c1
3 изменённых файлов: 20 добавлений и 12 удалений

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

@ -41,8 +41,10 @@ var progressListener4 = {
onLocationChange: function onLocationChange() { onLocationChange: function onLocationChange() {
ok(expectListener4, "didn't call progressListener4 for the first location change"); ok(expectListener4, "didn't call progressListener4 for the first location change");
gBrowser.removeProgressListener(this); gBrowser.removeProgressListener(this);
executeSoon(function () {
gBrowser.addTab(); gBrowser.addTab();
gBrowser.removeCurrentTab(); gBrowser.removeCurrentTab();
finish(); finish();
});
} }
}; };

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

@ -110,9 +110,11 @@ function runNextTest() {
let onHidden = onHiddenArray.shift(); let onHidden = onHiddenArray.shift();
info("[Test #" + gTestIndex + "] popup hidden (" + onHiddenArray.length + " hides remaining)"); info("[Test #" + gTestIndex + "] popup hidden (" + onHiddenArray.length + " hides remaining)");
executeSoon(function () {
onHidden.call(nextTest, this); onHidden.call(nextTest, this);
if (!onHiddenArray.length) if (!onHiddenArray.length)
goNext(); goNext();
});
}, onHiddenArray.length); }, onHiddenArray.length);
info("[Test #" + gTestIndex + "] added listeners; panel state: " + PopupNotifications.isPanelOpen); info("[Test #" + gTestIndex + "] added listeners; panel state: " + PopupNotifications.isPanelOpen);
} }

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

@ -84,13 +84,17 @@ var gTabsListener = {
// Reset arrays. // Reset arrays.
this._loadedURIs.length = 0; this._loadedURIs.length = 0;
this._openTabsCount = 0;
executeSoon(function () {
// Close all tabs. // Close all tabs.
while (gBrowser.tabs.length > 1) while (gBrowser.tabs.length > 1)
gBrowser.removeCurrentTab(); gBrowser.removeCurrentTab();
this._openTabsCount = 0;
// Test finished. This will move to the next one. // Test finished. This will move to the next one.
waitForFocus(gCurrentTest.finish, gBrowser.ownerDocument.defaultView); waitForFocus(gCurrentTest.finish, gBrowser.ownerDocument.defaultView);
});
} }
} }
} }