Do not call decodeURI() on non-URIs

The title here is not percent-encoded or anything, it's just text.
Calling decodeURI() can cause errors to be thrown if it doesn't happen
to be a valid URI.

Bug: 64236
Change-Id: Iee7c1db0c01cba405f0a2a03b0de58e9edb9a171
Extract some magic timeout values

Change-Id: Ic4c5a677ca05c4669aa44f0ce03356c19b63f3e7