Fix tests for Win and for short URLs

Change-Id: I5fbf25e541a082f4588fad1c0474e86f616e0c13