Implement gallery install API

This patch implements chrome.experimental.management.install() which is only available for use by the web store. Calling with an extensionId, causes the download url to be constructed internally and downloaded and then cause the installation to bypass the normal permissions dialog.

BUG=27431,54148

Review URL: http://codereview.chromium.org/3353015

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@58956 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
diff --git a/testserver.py b/testserver.py
index 099f351..4f30b2c 100644
--- a/testserver.py
+++ b/testserver.py
@@ -151,6 +151,7 @@
       self.EchoHandler] + self._get_handlers
 
     self._mime_types = {
+      'crx' : 'application/x-chrome-extension',
       'gif': 'image/gif',
       'jpeg' : 'image/jpeg',
       'jpg' : 'image/jpeg',
@@ -180,7 +181,7 @@
     """Returns the mime type for the specified file_name. So far it only looks
     at the file extension."""
 
-    (shortname, extension) = os.path.splitext(file_name)
+    (shortname, extension) = os.path.splitext(file_name.split("?")[0])
     if len(extension) == 0:
       # no extension.
       return self._default_mime_type