Introduced git+http(s) fake URL schema to support git urls which don't have "filename.git" portion (http://foo/bar vs http://foo/bar/filename.git).

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@110937 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py
index a44754f..a0e24aa 100755
--- a/tests/gclient_scm_test.py
+++ b/tests/gclient_scm_test.py
@@ -120,6 +120,22 @@
                             relpath=self.relpath)
     self.assertEqual(scm.FullUrlForRelativeUrl('/crap'), 'git://a/b/c/crap')
 
+  def testGITFakeHttpUrl(self):
+    self.url = 'git+http://foo'
+
+    self.mox.ReplayAll()
+    scm = self._scm_wrapper(url=self.url, root_dir=self.root_dir,
+                            relpath=self.relpath)
+    self.assertEqual(scm.url, 'http://foo')
+
+  def testGITFakeHttpsUrl(self):
+    self.url = 'git+https://foo'
+
+    self.mox.ReplayAll()
+    scm = self._scm_wrapper(url=self.url, root_dir=self.root_dir,
+                            relpath=self.relpath)
+    self.assertEqual(scm.url, 'https://foo')
+
   def testRunCommandException(self):
     options = self.Options(verbose=False)
     gclient_scm.os.path.exists(join(self.base_path, '.git')).AndReturn(False)