michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: let gBugWindow; michael@0: michael@0: function onLoad() { michael@0: gBugWindow.removeEventListener("load", onLoad); michael@0: gBugWindow.addEventListener("unload", onUnload); michael@0: gBugWindow.close(); michael@0: } michael@0: michael@0: function onUnload() { michael@0: gBugWindow.removeEventListener("unload", onUnload); michael@0: window.focus(); michael@0: finish(); michael@0: } michael@0: michael@0: // This test opens and then closes the certificate manager to test that it michael@0: // does not leak. The test harness keeps track of and reports leaks, so michael@0: // there are no actual checks here. michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: gBugWindow = window.openDialog("chrome://pippki/content/certManager.xul"); michael@0: gBugWindow.addEventListener("load", onLoad); michael@0: }