fix unit test

This commit is contained in:
Thijs Wenker 2015-08-22 03:32:53 +02:00
parent d84cf1859c
commit 67e945b884

View file

@ -51,11 +51,10 @@ unitTests.addTest("Test WebSocket invalid URL", function(finished) {
var hadError = false;
webSocket.onerror = this.registerCallbackFunction(function() {
hadError = true;
_this.done();
});
webSocket.onclose = this.registerCallbackFunction(function(event) {
_this.assertEquals(true, hadError, "hadError should be true");
_this.assertEquals(webSocket.CLOSED, webSocket.readyState, "readyState should be CLOSED");
_this.done();
});
this.assertEquals(webSocket.CONNECTING, webSocket.readyState, "readyState should be CONNECTING");
this.assertEquals(WEBSOCKET_INVALID_URL, webSocket.url, "url should be '" + WEBSOCKET_INVALID_URL + "'");