Bug 496335 - Don't restart Necko on Private Browsing mode transitions; r=mconnor

--HG--
rename : browser/components/privatebrowsing/test/unit/test_sslsite_transition.js => browser/components/privatebrowsing/test/unit/test_transition_nooffline.js
This commit is contained in:
Ehsan Akhgari 2009-07-11 20:24:13 +04:30
parent 1a5779f7c3
commit 63c0c4d3e5
4 changed files with 8 additions and 25 deletions

View File

@ -298,18 +298,6 @@ PrivateBrowsingService.prototype = {
getService(Ci.nsIHttpAuthManager);
authMgr.clearAll();
// Prevent any SSL sockets from remaining open. Without this, SSL
// websites may fail to load after switching the private browsing mode
// because the SSL sockets may still be open while the corresponding
// NSS resources have been destroyed by the logoutAndTeardown call
// above. See bug 463256 for more information.
let ios = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
if (!ios.offline) {
ios.offline = true;
ios.offline = false;
}
if (!this._inPrivateBrowsing) {
// Clear the error console
let consoleService = Cc["@mozilla.org/consoleservice;1"].

View File

@ -59,9 +59,8 @@ _BROWSER_TEST_FILES = \
browser_privatebrowsing_urlbarfocus.js \
browser_privatebrowsing_forgetthissite.js \
browser_privatebrowsing_pageinfo.js \
browser_privatebrowsing_sslsite_transition.js \
$(NULL)
# Test for bug 463256 disabled until we figure why it fails intermittently (bug 486640)
# browser_privatebrowsing_sslsite_transition.js \
libs:: $(_BROWSER_TEST_FILES)
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)

View File

@ -36,9 +36,7 @@
* ***** END LICENSE BLOCK ***** */
// This test makes sure that SSL sites load correctly after leaving the
// Private Browsing mode (bug 463256).
// This test is disabled until we figure why it fails intermittently (bug 486640).
// Private Browsing mode (bug 463256 and bug 496335).
function test() {
// initialization
@ -78,3 +76,5 @@ function test() {
}, true);
browser.contentWindow.location = kTestURL;
waitForExplicitFinish();
}

View File

@ -35,8 +35,8 @@
*
* ***** END LICENSE BLOCK ***** */
// This tests the private browsing service to make sure it switches the offline
// status as expected (see bug 463256).
// This tests the private browsing service to make sure it no longer switches
// the offline status (see bug 463256).
function run_test_on_service() {
// initialization
@ -59,15 +59,11 @@ function run_test_on_service() {
// enter the private browsing mode, and wait for the about:pb page to load
pb.privateBrowsingEnabled = true;
do_check_eq(observer.events.length, 2);
do_check_eq(observer.events[0], "offline");
do_check_eq(observer.events[1], "online");
do_check_eq(observer.events.length, 0);
// leave the private browsing mode, and wait for the SSL page to load again
pb.privateBrowsingEnabled = false;
do_check_eq(observer.events.length, 4);
do_check_eq(observer.events[2], "offline");
do_check_eq(observer.events[3], "online");
do_check_eq(observer.events.length, 0);
os.removeObserver(observer, "network:offline-status-changed", false);
prefBranch.clearUserPref("browser.privatebrowsing.keep_current_session");