Fix incorrect urls in WebSocket tests.

Replaced location.hostname with "127.0.0.1", as it was empty,
what lead to invalid urls.