add logging data for websocket test failure.

This commit is contained in:
Robert Sayre 2010-07-09 15:58:52 -07:00
parent a4bb457c1b
commit b2fbfe3b56

View File

@ -63,7 +63,19 @@ function shouldNotOpen(e)
function shouldNotReceiveCloseEvent(e)
{
var ws = e.target;
ok(false, "onclose shouldn't be called on test " + ws._testNumber + "!");
var extendedErrorInfo = "";
if (!ws._testNumber) {
extendedErrorInfo += "ws members:\n";
for (var i in ws) {
extendedErrorInfo += (i + ": " + ws[i] + "\n");
}
extendedErrorInfo += "\ne members:\n";
for (var i in e) {
extendedErrorInfo += (i + ": " + e[i] + "\n");
}
}
ok(false, "onclose shouldn't be called on test " + ws._testNumber + "!" + extendedErrorInfo);
}
function shouldCloseCleanly(e)