Cleaned up urlBase() readability.
Updated unit tests, and added a test for the app context in the URL.

Change-Id: I110b62ff8366a503c3309df0f26a7dd213ae0c5f
diff --git a/web/gui/src/main/webapp/tests/app/fw/remote/websocket-spec.js b/web/gui/src/main/webapp/tests/app/fw/remote/websocket-spec.js
index c3599cb..6b0d4a7 100644
--- a/web/gui/src/main/webapp/tests/app/fw/remote/websocket-spec.js
+++ b/web/gui/src/main/webapp/tests/app/fw/remote/websocket-spec.js
@@ -57,6 +57,9 @@
                 port: function () { return '80'; },
                 search: function() {
                     return {debug: 'true'};
+                },
+                absUrl: function () {
+                    return 'ws://foo:123/onos/ui/websock/path';
                 }
             };
         })