From 51b9c4dc99cebc41fc78a328e658f2d6f5763fb1 Mon Sep 17 00:00:00 2001 From: Justin Dolske Date: Thu, 23 Sep 2010 18:46:41 -0700 Subject: [PATCH] Attempt to fix frequent orange test (bug 482175). a=me --- .../passwordmgr/test/test_prompt.html | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/toolkit/components/passwordmgr/test/test_prompt.html b/toolkit/components/passwordmgr/test/test_prompt.html index 2711df4e8e4..948828a02ae 100644 --- a/toolkit/components/passwordmgr/test/test_prompt.html +++ b/toolkit/components/passwordmgr/test/test_prompt.html @@ -449,9 +449,14 @@ function handleLoad() { // Housekeeping: change it back to the original login4. Actually, // just delete it and we'll re-add it as the next test. - tmpLogin.init("http://mochi.test:8888", null, "mochitest3", - "mochiuser3", "mochipass3-new", "", ""); - pwmgr.removeLogin(tmpLogin); + function clearIt() { + netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); + tmpLogin.init("http://mochi.test:8888", null, "mochitest3", + "mochiuser3", "mochipass3-new", "", ""); + pwmgr.removeLogin(tmpLogin); + } + setTimeout(clearIt, 0); + // Clear cached auth from this subtest, and avoid leaking due to bug 459620. var authMgr = Cc['@mozilla.org/network/http-auth-manager;1']. getService(Ci.nsIHttpAuthManager); @@ -474,7 +479,11 @@ function handleLoad() { clickPopupButton(popup, kRememberButton); popup.remove(); - finishTest(); + function finishIt() { + netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); + finishTest(); + } + setTimeout(finishIt, 0); break; default: