bug 866867 test_spdy.js flaky with parallel connections r=hurley

This commit is contained in:
Patrick McManus 2013-04-29 20:05:39 -04:00
Родитель edf433d511
Коммит ae3029f450
2 изменённых файлов: 7 добавлений и 2 удалений

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

@ -2551,7 +2551,7 @@ nsHttpConnectionMgr::OnMsgSpeculativeConnect(int32_t, void *param)
if (preferredEntry)
ent = preferredEntry;
if (mNumHalfOpenConns <= gHttpHandler->ParallelSpeculativeConnectLimit() &&
if (mNumHalfOpenConns < gHttpHandler->ParallelSpeculativeConnectLimit() &&
!ent->mIdleConns.Length() && !RestrictConnections(ent) &&
!AtActiveConnectionLimit(ent, trans->Caps())) {
CreateTransport(ent, trans, trans->Caps(), true);

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

@ -331,13 +331,18 @@ function addCertOverride(host, port, bits) {
function run_test() {
// Set to allow the cert presented by our SPDY server
do_get_profile();
var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
var oldPref = prefs.getIntPref("network.http.speculative-parallel-limit");
prefs.setIntPref("network.http.speculative-parallel-limit", 0);
addCertOverride("localhost", 4443,
Ci.nsICertOverrideService.ERROR_UNTRUSTED |
Ci.nsICertOverrideService.ERROR_MISMATCH |
Ci.nsICertOverrideService.ERROR_TIME);
prefs.setIntPref("network.http.speculative-parallel-limit", oldPref);
// Make sure spdy is enabled
var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
prefs.setBoolPref("network.http.spdy.enabled", true);
// And make go!