bug 1432150 - restore rcwn pref after test_immutable.js test complete, r=mcmanus

The test previously only switched off the pref and didn't restore the
old value when done.

--HG--
extra : rebase_source : 87a769b3148f17b74f98c343743039b8d0d265c2
This commit is contained in:
Daniel Stenberg 2018-01-22 05:35:00 +02:00
Родитель cab6643096
Коммит 3d74499ee4
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -5,6 +5,7 @@ var prefs;
var spdypref;
var http2pref;
var origin;
var rcwnpref;
function run_test() {
var env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
@ -18,6 +19,7 @@ function run_test() {
spdypref = prefs.getBoolPref("network.http.spdy.enabled");
http2pref = prefs.getBoolPref("network.http.spdy.enabled.http2");
rcwnpref = prefs.getBoolPref("network.http.rcwn.enabled");
prefs.setBoolPref("network.http.spdy.enabled", true);
prefs.setBoolPref("network.http.spdy.enabled.http2", true);
@ -39,6 +41,7 @@ function run_test() {
function resetPrefs() {
prefs.setBoolPref("network.http.spdy.enabled", spdypref);
prefs.setBoolPref("network.http.spdy.enabled.http2", http2pref);
prefs.setBoolPref("network.http.rcwn.enabled", rcwnpref);
prefs.clearUserPref("network.dns.localDomains");
}