зеркало из https://github.com/mozilla/pjs.git
Bug 621347 - [SeaMonkey, WINNT 5.2, Debug] mochitests-1: intermittent "test_ws_basic_tests.html | Test timed out"; (Dv1a) testWebSocket4(): stop generating a 450 KiB log line from bug 562681.
r=Olli.Pettay a=(test only).
This commit is contained in:
Родитель
bc5c0e7c77
Коммит
434e78f5a2
|
@ -132,6 +132,7 @@ function testWebSocket3() {
|
|||
|
||||
function testWebSocket4() {
|
||||
ws = new WebSocket("ws://mochi.test:8888/tests/content/base/test/file_ws_basic_tests", "test");
|
||||
// String length = (10,000 - 1) * 23 = 229,977 = almost 225 KiB.
|
||||
var longString = new Array(10000).join("-huge websocket message");
|
||||
ws.onopen = function(e) {
|
||||
is(this, ws, "'this' should point to the WebSocket. (1)");
|
||||
|
@ -148,7 +149,9 @@ function testWebSocket4() {
|
|||
}
|
||||
ws.onmessage = function(e) {
|
||||
is(this, ws, "'this' should point to the WebSocket. (3)");
|
||||
is(e.data, longString, "Didn't get the huge message back!");
|
||||
// Do not use |is(e.data, longString, "...");| that results in a _very_ long line.
|
||||
is(e.data.length, longString.length, "Length of received message");
|
||||
ok(e.data == longString, "Content of received message");
|
||||
document.getElementById('log').textContent += "\nReceived the huge message";
|
||||
this.close();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче