mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1220304 - Part 4a - Remove trailing whitespace from test_websocket.html. r=baku
This commit is contained in:
parent
a78ae35903
commit
a9eae62e9f
@ -66,8 +66,8 @@
|
||||
* 41. HSTS
|
||||
* 42. non-char utf-8 sequences
|
||||
* 43. Test setting binaryType attribute
|
||||
* 44. Test sending/receving binary ArrayBuffer
|
||||
* 45. Test sending/receving binary Blob
|
||||
* 44. Test sending/receving binary ArrayBuffer
|
||||
* 45. Test sending/receving binary Blob
|
||||
* 46. Test that we don't dispatch incoming msgs once in CLOSING state
|
||||
* 47. Make sure onerror/onclose aren't called during close()
|
||||
*/
|
||||
@ -77,13 +77,13 @@ var last_test = 47;
|
||||
|
||||
|
||||
// Set this to >1 if you want to run the suite multiple times to probe for
|
||||
// random orange failures.
|
||||
// random orange failures.
|
||||
// - Do NOT check into mozilla-central with a value != 1.
|
||||
// - Too large a count will wind up causing tryserver to timeout the test (which
|
||||
// is ok, but means all testruns will be orange). If I set first_test to >22
|
||||
// (i.e don't run any of the tests that require waiting) I can get ~250-300
|
||||
// iterations of the remaining tests w/o a timeout.
|
||||
var testsuite_iterations = 1;
|
||||
var testsuite_iterations = 1;
|
||||
|
||||
|
||||
var current_test = first_test;
|
||||
@ -113,7 +113,7 @@ function shouldNotReceiveCloseEvent(e)
|
||||
extendedErrorInfo += (i + ": " + e[i] + "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FIXME: see bug 578276. This should be a test failure, but it's too flaky on the tbox.
|
||||
ok(true, "onclose shouldn't be called on test " + ws._testNumber + "!" + extendedErrorInfo);
|
||||
}
|
||||
@ -191,7 +191,7 @@ function doTest(number)
|
||||
}
|
||||
|
||||
if (testsuite_iteration > 1) {
|
||||
$("feedback").innerHTML = "test suite iteration #" + testsuite_iteration + " of " + testsuite_iterations +
|
||||
$("feedback").innerHTML = "test suite iteration #" + testsuite_iteration + " of " + testsuite_iterations +
|
||||
": executing test: " + number + " of " + last_test + " tests.";
|
||||
} else {
|
||||
$("feedback").innerHTML = "executing test: " + number + " of " + last_test + " tests.";
|
||||
@ -390,7 +390,7 @@ function test8()
|
||||
{
|
||||
shouldCloseCleanly(e);
|
||||
// We called close() with no close code: so pywebsocket will also send no
|
||||
// close code, which translates to code 1005
|
||||
// close code, which translates to code 1005
|
||||
ok(e.code == 1005, "test-8 close code has wrong value:" + e.code);
|
||||
ok(e.reason == "", "test-8 close reason has wrong value:" + e.reason);
|
||||
doTest(9);
|
||||
@ -419,7 +419,7 @@ function test9()
|
||||
};
|
||||
|
||||
ws.close();
|
||||
|
||||
|
||||
// the server injects a delay, so proceed with this in the background
|
||||
doTest(10);
|
||||
}
|
||||
@ -520,7 +520,7 @@ function test12()
|
||||
|
||||
function test13()
|
||||
{
|
||||
// previous versions of this test counted the number of protocol errors returned, but the
|
||||
// previous versions of this test counted the number of protocol errors returned, but the
|
||||
// protocol stack typically closes down after reporting a protocol level error - trying
|
||||
// to resync is too dangerous
|
||||
|
||||
@ -1110,7 +1110,7 @@ function test37()
|
||||
{
|
||||
ok(e.code != 3101, "test 37c custom server code not present");
|
||||
ok(e.reason == "", "test 37c custom server reason not present");
|
||||
doTest(38);
|
||||
doTest(38);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1152,7 +1152,7 @@ function test39()
|
||||
ws.onclose = function(e)
|
||||
{
|
||||
ok(true, "test 39 close");
|
||||
ok(status_test39 == "opened", "test 39 did open");
|
||||
ok(status_test39 == "opened", "test 39 did open");
|
||||
doTest(40);
|
||||
};
|
||||
}
|
||||
@ -1176,7 +1176,7 @@ function test40()
|
||||
ws.onclose = function(e)
|
||||
{
|
||||
ok(true, "test 40 close");
|
||||
ok(status_test40 == "started", "test 40 did not open");
|
||||
ok(status_test40 == "started", "test 40 did not open");
|
||||
doTest(41);
|
||||
};
|
||||
}
|
||||
@ -1211,7 +1211,7 @@ function test41()
|
||||
|
||||
// try ws:// again, it should be done over wss:// now due to hsts
|
||||
var wsc = CreateTestWS("ws://example.com/tests/dom/base/test/file_websocket", "test-41c");
|
||||
|
||||
|
||||
wsc.onopen = function(e)
|
||||
{
|
||||
ok(true, "test 41c open");
|
||||
@ -1334,7 +1334,7 @@ function test44()
|
||||
|
||||
function createDOMFile(fileName, fileData)
|
||||
{
|
||||
// create File in profile dir
|
||||
// create File in profile dir
|
||||
var dirSvc = SpecialPowers.Cc["@mozilla.org/file/directory_service;1"]
|
||||
.getService(SpecialPowers.Ci.nsIProperties);
|
||||
var testFile = dirSvc.get("ProfD", SpecialPowers.Ci.nsIFile);
|
||||
@ -1345,7 +1345,7 @@ function createDOMFile(fileName, fileData)
|
||||
outStream.write(fileData, fileData.length);
|
||||
outStream.close();
|
||||
|
||||
// Set filename into DOM <input> field, as if selected by user
|
||||
// Set filename into DOM <input> field, as if selected by user
|
||||
var fileList = document.getElementById('fileList');
|
||||
SpecialPowers.wrap(fileList).value = testFile.path;
|
||||
|
||||
@ -1387,7 +1387,7 @@ function test45()
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(event)
|
||||
{
|
||||
ok(reader.result == "flob", "response should be 'flob': got '"
|
||||
ok(reader.result == "flob", "response should be 'flob': got '"
|
||||
+ reader.result + "'");
|
||||
};
|
||||
reader.onerror = function(event)
|
||||
@ -1433,7 +1433,7 @@ function test47()
|
||||
|
||||
ws.onerror = function (e)
|
||||
{
|
||||
ok(ws.readyState == 3, "test-47: readyState should be CLOSED(3) in onerror: got "
|
||||
ok(ws.readyState == 3, "test-47: readyState should be CLOSED(3) in onerror: got "
|
||||
+ ws.readyState);
|
||||
ok(!ws._withinClose, "onerror() called during close()!");
|
||||
hasError = true;
|
||||
@ -1443,7 +1443,7 @@ function test47()
|
||||
{
|
||||
shouldCloseNotCleanly(e);
|
||||
ok(hasError, "test-47: should have called onerror before onclose");
|
||||
ok(ws.readyState == 3, "test-47: readyState should be CLOSED(3) in onclose: got "
|
||||
ok(ws.readyState == 3, "test-47: readyState should be CLOSED(3) in onclose: got "
|
||||
+ ws.readyState);
|
||||
ok(!ws._withinClose, "onclose() called during close()!");
|
||||
ok(e.code == 1006, "test-47 close code should be 1006 but is:" + e.code);
|
||||
|
Loading…
Reference in New Issue
Block a user