зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1408867. Make sure specualtive connections are enabled for tests where it's assumed. r=mcmanus
This commit is contained in:
Родитель
37c5443f1e
Коммит
afbc1f212e
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче