Make tests for expected URLs more robust

By actually using the expected form for the assertions and
not just one that happens to match depending on configuration.

Change-Id: Ie7937cb88339b8c3f988c87f118479b7bd7ba2db
Merge "Make tests for expected URLs more robust"