More debug info on the browser controller.

Add timing info on actual requests to the http server.

Review URL: https://codereview.chromium.org//16848019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24017 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/tools/testing/dart/browser_controller.dart b/tools/testing/dart/browser_controller.dart
index 54c98e1..52628f1 100644
--- a/tools/testing/dart/browser_controller.dart
+++ b/tools/testing/dart/browser_controller.dart
@@ -759,6 +759,7 @@
     return HttpServer.bind(local_ip, 0).then((createdServer) {
       httpServer = createdServer;
       void handler(HttpRequest request) {
+        DebugLogger.info("Handling request to: ${request.uri.path}");
         if (request.uri.path.startsWith(reportPath)) {
           var browserId = request.uri.path.substring(reportPath.length + 1);
           var testId = int.parse(request.queryParameters["id"].split("=")[1]);
@@ -776,11 +777,14 @@
           var browserId = request.uri.path.substring(nextTestPath.length + 1);
           textResponse = getNextTest(browserId);
         } else {
-          // We silently ignore other requests.
+          DebugLogger.info("Handling non standard request to: "
+                           "${request.uri.path}");
         }
         request.response.write(textResponse);
         request.listen((_) {}, onDone: request.response.close);
-        request.response.done.catchError((error) {
+        request.response.done.then((_) {
+          DebugLogger.info("Done handling request to: ${request.uri.path}");
+        }).catchError((error) {
           if (!underTermination) {
             print("URI ${request.uri}");
             print("Textresponse $textResponse");
@@ -830,6 +834,7 @@
         String back = buffer.toString();
         request.response.close();
         testDoneCallBack(browserId, back, testId);
+        DebugLogger.info("Done handling request to: ${request.uri.path}");
       }, onError: (error) { print(error); });
   }