temp-debug-necko-unittests
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 100 57d3a55865f4ad702e9567f73fdaac0f8ba20023
permissions -rw-r--r--
State as of now

diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -571,22 +571,22 @@
 pref("network.http.keep-alive.timeout", 300);
 
 // limit the absolute number of http connections.
-pref("network.http.max-connections", 30);
+pref("network.http.max-connections", 1000);
 
 // limit the absolute number of http connections that can be established per
 // host.  if a http proxy server is enabled, then the "server" is the proxy
 // server.  Otherwise, "server" is the http origin server.
-pref("network.http.max-connections-per-server", 15);
+pref("network.http.max-connections-per-server", 1000);
 
 // if network.http.keep-alive is true, and if NOT connecting via a proxy, then
 // a new connection will only be attempted if the number of active persistent
 // connections to the server is less then max-persistent-connections-per-server.
-pref("network.http.max-persistent-connections-per-server", 6);
+pref("network.http.max-persistent-connections-per-server", 1000);
 
 // if network.http.keep-alive is true, and if connecting via a proxy, then a
 // new connection will only be attempted if the number of active persistent
 // connections to the proxy is less then max-persistent-connections-per-proxy.
-pref("network.http.max-persistent-connections-per-proxy", 8);
+pref("network.http.max-persistent-connections-per-proxy", 1000);
 
 // amount of time (in seconds) to suspend pending requests, before spawning a
 // new connection, once the limit on the number of persistent connections per
@@ -614,7 +614,7 @@
 pref("network.http.proxy.pipelining", false);
 
 // Max number of requests in the pipeline
-pref("network.http.pipelining.maxrequests" , 4);
+pref("network.http.pipelining.maxrequests" , 1000);
 
 // </http>
 
diff --git a/netwerk/test/httpserver/test/head_utils.js b/netwerk/test/httpserver/test/head_utils.js
--- a/netwerk/test/httpserver/test/head_utils.js
+++ b/netwerk/test/httpserver/test/head_utils.js
@@ -159,6 +159,9 @@
     do_test_pending();
 
     var test = testArray[testIndex];
+
+    print("Running: " + testIndex + "\n");
+
     var ch = makeChannel(test.path);
     test.initChannel(ch);
 
@@ -176,6 +179,7 @@
 
       onStartRequest: function(request, cx)
       {
+        print("onStartRequest[" + testIndex + "]\n");
         var ch = request.QueryInterface(Ci.nsIHttpChannel)
                         .QueryInterface(Ci.nsIHttpChannelInternal);
 
@@ -189,10 +193,14 @@
       },
       onStopRequest: function(request, cx, status)
       {
+        print("onStopRequest[" + testIndex + "]\n");
+
         var ch = request.QueryInterface(Ci.nsIHttpChannel)
                         .QueryInterface(Ci.nsIHttpChannelInternal);
       
         testArray[testIndex].onStopRequest(ch, cx, status, this._data);
+
+        request.cancel(Components.results.NS_ERROR_ABORT);
 
         performNextTest();
         do_test_finished();
diff --git a/netwerk/test/unit/test_authentication.js b/netwerk/test/unit/test_authentication.js
--- a/netwerk/test/unit/test_authentication.js
+++ b/netwerk/test/unit/test_authentication.js
@@ -1,6 +1,8 @@
 // This file tests authentication prompt callbacks
 
 do_import_script("netwerk/test/httpserver/httpd.js");
+
+DEBUG = true;
 
 const FLAG_RETURN_FALSE   = 1 << 0;
 const FLAG_WRONG_PASSWORD = 1 << 1;
@@ -10,6 +12,7 @@
 
 
 function AuthPrompt1(flags) {
+  print("new AuthPrompt1\n");
   this.flags = flags;
 }
 
@@ -33,6 +36,8 @@
   promptUsernameAndPassword:
     function ap1_promptUP(title, text, realm, savePW, user, pw)
   {
+    print("AuthPrompt1.promptUsernameAndPassword\n");
+
     // Note that the realm here isn't actually the realm. it's a pw mgr key.
     do_check_eq("localhost:4444 (" + this.expectedRealm + ")", realm);
     if (text.indexOf(this.expectedRealm) == -1)
@@ -65,6 +70,7 @@
 };
 
 function AuthPrompt2(flags) {
+  print("new AuthPrompt2\n");
   this.flags = flags;
 }
 
@@ -84,6 +90,8 @@
   promptAuth:
     function ap2_promptAuth(channel, level, authInfo)
   {
+    print("AuthPrompt2.promptAuth\n");
+
     var isNTLM = channel.URI.path.indexOf("ntlm") != -1;
     var isDigest = channel.URI.path.indexOf("digest") != -1;
 
@@ -203,6 +211,8 @@
   expectedCode: 401, // Unauthorized
 
   onStartRequest: function test_onStartR(request, ctx) {
+    print("listener.onStartRequest\n");
+
     try {
       if (!Components.isSuccessCode(request.status))
         do_throw("Channel should have a success code!");
@@ -226,7 +236,13 @@
   },
 
   onStopRequest: function test_onStopR(request, ctx, status) {
+    print("listener.onStopRequest\ncurrent_test = " + current_test +
+          "\ntests.length: " + tests.length + "\n");
+
+    print("request: " + request + "\n");
     do_check_eq(status, Components.results.NS_ERROR_ABORT);
+
+    request.cancel(Components.results.NS_ERROR_ABORT);
 
     if (current_test < (tests.length - 1)) {
       // First, gotta clear the auth cache
@@ -294,6 +310,8 @@
   chan.notificationCallbacks = new Requestor(FLAG_RETURN_FALSE, 1);
   listener.expectedCode = 401; // Unauthorized
   chan.asyncOpen(listener, null);
+
+  print('Starting the test_returnfalse1\n');
 
   do_test_pending();
 }