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) { function closeToolbarCustomization(aWindow, aCTWindow) {
var osString = Components.classes["@mozilla.org/xre/app-info;1"]. // Force the cleanup code to be run now instead of onunload.
getService(Components.interfaces.nsIXULRuntime).OS; // 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(); aCTWindow.finishToolbarCustomization();
// On windows and linux, need to explicitly close the window // On windows and linux, need to explicitly close the window.
if (osString != "Darwin") if (!gCustomizeSheet)
aCTWindow.close(); aCTWindow.close();
} }