If the app gets initialized before being redirected from empty
URL (e.g. https://gerrit-review.googlesource.com/), the trailing slash
is returned as pathname resutlting in _getUrl() returning 'https:' thus
generating valid URL for loading plugins. This masked the actual problem
by generating valid plugin URLs while waiting for loading from the
invalid ones.
Use URL.origin() instead for building full plugin URLs.
Bug: Issue 8941
Change-Id: I65bad6c4b1c418c2588e131073b2d4ba8b80117c