Orange fix from bug 599969 Part 6. Make sure we clean up the tabs we add.

This commit is contained in:
Shawn Wilsher
2010-11-10 08:54:56 -08:00
parent 7b8e2a8368
commit 416b4bb4e5

View File

@@ -181,9 +181,20 @@ function test() {
}
function runNextTest() {
// Remove any extraneous tabs.
for (let tabCount = gBrowser.tabContainer.childNodes.length;
tabCount > 1; tabCount--) {
gBrowser.selectedTab = gBrowser.tabContainer.childNodes[tabCount - 1];
gBrowser.removeCurrentTab();
}
if (tests.length == 0)
finish();
else {
// Create a new tab for our test to use.
gBrowser.selectedTab = gBrowser.addTab();
// Now we can run our test.
currentTest = tests.shift();
testPlacesPanel(function() {
changeSidebarDirection("ltr");