test cleanup

This commit is contained in:
Dão Gottwald 2009-11-22 11:52:22 +01:00
parent ce7a9f6cc1
commit 9f9e95635f

View File

@ -65,14 +65,11 @@ function testCustomize(aWindow, aCallback) {
}
function closeToolbarCustomization(aWindow, aCTWindow) {
var osString = Components.classes["@mozilla.org/xre/app-info;1"].
getService(Components.interfaces.nsIXULRuntime).OS;
// Force the cleanup code to be run now instead of onunload
// This also hides the sheet on Mac
// Force the cleanup code to be run now instead of onunload.
// This also hides the sheet on Mac.
aCTWindow.finishToolbarCustomization();
// On windows and linux, need to explicitly close the window
if (osString != "Darwin")
// On windows and linux, need to explicitly close the window.
if (!gCustomizeSheet)
aCTWindow.close();
}