removed unused code, renamed UnitTest.ready() to UnitTest.done()

This commit is contained in:
Thijs Wenker 2015-08-21 19:07:33 +02:00
parent 7f5fc64f6c
commit 55fd847636
3 changed files with 4 additions and 5 deletions

View file

@ -173,7 +173,7 @@ UnitTest.prototype.raises = function(func, message) {
throw new UnthrownException(message);
}
UnitTest.prototype.ready = function() {
UnitTest.prototype.done = function() {
if (this.timeout !== undefined) {
Script.clearTimeout(this.timeoutTimer);
this.successCallback(this);

View file

@ -35,7 +35,7 @@ unitTests.addTest("Test default WebSocket values", function(finished) {
});
webSocket.onclose = this.registerCallbackFunction(function(event) {
_this.assertEquals(webSocket.CLOSED, webSocket.readyState, "readyState should be CLOSED");
_this.ready();
_this.done();
});
this.assertEquals(webSocket.CONNECTING, webSocket.readyState, "readyState should be CONNECTING");
this.assertEquals("blob", webSocket.binaryType, "binaryType should be 'blob'");
@ -55,7 +55,7 @@ unitTests.addTest("Test WebSocket invalid URL", function(finished) {
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.ready();
_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 + "'");
@ -78,7 +78,7 @@ unitTests.addTest("Test WebSocketServer with three clients", function(finished)
if (respondedClients === NUMBER_OF_CLIENTS) {
webSocketServer.close();
_this.assertEquals(false, webSocketServer.listening, "listening should be false");
_this.ready();
_this.done();
}
});
newClient.send(JSON.stringify({message: TEST_MESSAGE, client: connectedClients}));

View file

@ -39,7 +39,6 @@ void WebSocketClass::initialize() {
QScriptValue WebSocketClass::constructor(QScriptContext* context, QScriptEngine* engine) {
QString url;
QScriptValue callee = context->callee();
if (context->argumentCount() == 1) {
url = context->argument(0).toString();
}