1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/manager/ssl/tests/mochitest/browser/browser_certificateManagerLeak.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,26 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +let gBugWindow; 1.9 + 1.10 +function onLoad() { 1.11 + gBugWindow.removeEventListener("load", onLoad); 1.12 + gBugWindow.addEventListener("unload", onUnload); 1.13 + gBugWindow.close(); 1.14 +} 1.15 + 1.16 +function onUnload() { 1.17 + gBugWindow.removeEventListener("unload", onUnload); 1.18 + window.focus(); 1.19 + finish(); 1.20 +} 1.21 + 1.22 +// This test opens and then closes the certificate manager to test that it 1.23 +// does not leak. The test harness keeps track of and reports leaks, so 1.24 +// there are no actual checks here. 1.25 +function test() { 1.26 + waitForExplicitFinish(); 1.27 + gBugWindow = window.openDialog("chrome://pippki/content/certManager.xul"); 1.28 + gBugWindow.addEventListener("load", onLoad); 1.29 +}