merge
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 02 Feb 2010 18:57:41 -0800
changeset 37846 2d69a760d87893f7be5b9218eae1f10500865cae
parent 37845 e03e9d4315d8b99f9135ea3e971c74a6eda8ef30 (current diff)
parent 37844 27c81f40bdfdb3915565cdb77bb294c521bbb8dc (diff)
child 37848 48161d3f25f926ddc335d4754305aafbcbf55a4e
push id11463
push userdholbert@mozilla.com
push dateWed, 03 Feb 2010 02:59:54 +0000
treeherdermozilla-central@48161d3f25f9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.3a1pre
merge
--- a/testing/mochitest/server.js
+++ b/testing/mochitest/server.js
@@ -200,16 +200,29 @@ function createMochitestServer(serverBas
   server.registerPathHandler("/server/shutdown", serverShutdown);
   server.registerContentType("sjs", "sjs"); // .sjs == CGI-like functionality
   server.registerContentType("jar", "application/x-jar");
   server.registerContentType("ogg", "application/ogg");
   server.registerContentType("ogv", "video/ogg");
   server.registerContentType("oga", "audio/ogg");
   server.setIndexHandler(defaultDirHandler);
 
+  var serverRoot =
+    {
+      getFile: function getFile(path)
+      {
+        var file = serverBasePath.clone().QueryInterface(Ci.nsILocalFile);
+        file.appendRelativePath(path);
+        return file;
+      },
+      QueryInterface: function(aIID) { return this; }
+    };
+
+  server.setObjectState("SERVER_ROOT", serverRoot);
+
   processLocations(server);
 
   return server;
 }
 
 /**
  * Notifies the HTTP server about all the locations at which it might receive
  * requests, so that it can properly respond to requests on any of the hosts it