From 90da367e4407fa3263afdfa25a065a4a6efb3c95 Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Mon, 3 Jan 2011 14:56:40 +0100 Subject: [PATCH] Bug 621347 - [SeaMonkey, WINNT 5.2, Debug] mochitests-1: intermittent "test_ws_basic_tests.html | Test timed out"; (Bv1) Add/Re-enable '.wasClean' checks from (bug 573227 ->) bug 572975. r=Olli.Pettay a=(test only). --- content/base/test/test_ws_basic_tests.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/content/base/test/test_ws_basic_tests.html b/content/base/test/test_ws_basic_tests.html index b8d68a85387c..4c3386b55130 100644 --- a/content/base/test/test_ws_basic_tests.html +++ b/content/base/test/test_ws_basic_tests.html @@ -57,6 +57,7 @@ function testWebSocket () { } ws.onclose = function(e) { is(results.length, 0, "All the messages should have been processed!"); + ok(e.wasClean, "Connection closed cleanly"); testWebSocket2(); } ws.onerror = function(e) { @@ -83,6 +84,7 @@ function testWebSocket2() { } ws.onclose = function(e) { is(messageCount, testCount, "Didn't receive all the messages!"); + ok(e.wasClean, "Connection closed cleanly"); testWebSocket3(); } ws.onerror = function(e) { @@ -113,6 +115,7 @@ function testWebSocket3() { } ws.onclose = function(e) { is(messageCount, testCount, "Didn't receive all the messages!"); + ok(e.wasClean, "Connection closed cleanly"); testWebSocket4(); } ws.onerror = function(e) { @@ -140,7 +143,7 @@ function testWebSocket4() { } ws.onclose = function(e) { is(this, ws, "'this' should point to the WebSocket. (2)"); - //ok(e.wasClean, "Connection should have closed cleanly."); + ok(e.wasClean, "Connection closed cleanly"); testWebSocket5(); } ws.onerror = function(e) { @@ -163,7 +166,7 @@ function testWebSocket5() { this.close(); } ws.onclose = function(e) { - //ok(e.wasClean, "Connection should have closed cleanly."); + ok(e.wasClean, "Connection closed cleanly"); is(this.bufferedAmount, 0, "Shouldn't have anything buffered"); var msg = "some data"; this.send(msg);