Bug 482051 - Remove mentions of the browser.privatebrowsing.keep_current_session pref; r=jdm

This commit is contained in:
Ehsan Akhgari 2015-04-02 13:54:09 -04:00
parent 02e7de443a
commit 17243ad410
3 changed files with 9 additions and 32 deletions

View File

@ -141,10 +141,6 @@ function test() {
*/
function setPrefs() {
gPrefService.setIntPref("browser.startup.page", 3);
gPrefService.setBoolPref(
"browser.privatebrowsing.keep_current_session",
true
);
gPrefService.setBoolPref("browser.tabs.warnOnClose", false);
}
@ -170,13 +166,9 @@ function test() {
Services.obs.removeObserver(observer, o);
// Reset the prefs we touched
[
"browser.startup.page",
"browser.privatebrowsing.keep_current_session"
].forEach(function (pref) {
if (gPrefService.prefHasUserValue(pref))
gPrefService.clearUserPref(pref);
});
let pref = "browser.startup.page";
if (gPrefService.prefHasUserValue(pref))
gPrefService.clearUserPref(pref);
gPrefService.setBoolPref("browser.tabs.warnOnClose", oldWarnTabsOnClose);
// Reset the window type

View File

@ -140,23 +140,13 @@ function addTabWithToolbarRunTests(win) {
output: new RegExp("^Copied to clipboard.$"),
},
post: function() {
try {
clip.getData(trans, clipid.kGlobalClipboard);
let str = new Object();
let strLength = new Object();
trans.getTransferData("image/png", str, strLength);
clip.getData(trans, clipid.kGlobalClipboard);
let str = new Object();
let strLength = new Object();
trans.getTransferData("image/png", str, strLength);
ok(str.value, "screenshot exists");
ok(strLength.value > 0, "screenshot has length");
}
finally {
Services.prefs.setBoolPref("browser.privatebrowsing.keep_current_session", true);
// Recent PB changes to the test I'm modifying removed the 'pb'
// variable, but left this line in tact. This seems so obviously
// wrong that I'm leaving this in in case the analysis is wrong
// pb.privateBrowsingEnabled = true;
}
ok(str.value, "screenshot exists");
ok(strLength.value > 0, "screenshot has length");
}
},
]);

View File

@ -21,11 +21,6 @@ function runAsyncTests(tests, dontResetBefore = false) {
cps = Cc["@mozilla.org/content-pref/service;1"].
getService(Ci.nsIContentPrefService2);
// Without this the private-browsing service tries to open a dialog when you
// change its enabled state.
Services.prefs.setBoolPref("browser.privatebrowsing.keep_current_session",
true);
let s = {};
Cu.import("resource://test/AsyncRunner.jsm", s);
asyncRunner = new s.AsyncRunner({