Bug 1408867. Make sure specualtive connections are enabled for tests where it's assumed. r=mcmanus

This commit is contained in:
Magnus Melin 2018-01-23 23:31:17 +02:00
Родитель 37c5443f1e
Коммит afbc1f212e
2 изменённых файлов: 13 добавлений и 0 удалений

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

@ -4,6 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Cu.import("resource://gre/modules/Services.jsm");
var CC = Components.Constructor;
const ServerSocket = CC("@mozilla.org/network/server-socket;1",
"nsIServerSocket",
@ -331,6 +333,11 @@ function run_test() {
ios = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
Services.prefs.setIntPref("network.http.speculative-parallel-limit", 6);
registerCleanupFunction(() => {
Services.prefs.clearUserPref("network.http.speculative-parallel-limit");
});
do_test_pending();
next_test();
}

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

@ -10,6 +10,12 @@ function run_test() {
debugDump("testing recovery of mar download after pause and resume");
// This test assumes speculative connections enabled.
Services.prefs.setIntPref("network.http.speculative-parallel-limit", 6);
registerCleanupFunction(() => {
Services.prefs.clearUserPref("network.http.speculative-parallel-limit");
});
Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, false);
start_httpserver({slowDownload: true});
setUpdateURL(gURLData + gHTTPHandlerPath);