mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
b8b0aff729
commit
2b80a6f4a6
@ -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"].
|
||||
|
@ -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)
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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");
|
Loading…
Reference in New Issue
Block a user