Commit 778e47ed authored by Glenn Adams's avatar Glenn Adams

Updatte wsp helper.

parent 89fc99c1
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -14,16 +14,19 @@ function run(tOuter) {
ws.send(data);
assert_equals(ws.bufferedAmount, data.length);
tData = async_test(defProperties.expandedName + '-check-data');
ws.onmessage = tData.step_func_done(function(evt) {
assert_equals(evt.data, data);
ws.close();
tDone = async_test(defProperties.expandedName + '-check-done');
ws.onclose = tDone.step_func_done(function(evt) {
assert_true(open);
open = false;
assert_true(evt.wasClean);
});
});
});
ws.onmessage = tData.step_func_done(function(evt) {
assert_equals(evt.data, data);
ws.close();
tDone = async_test(defProperties.expandedName + '-check-done');
});
ws.onclose = tDone.step_func_done(function(evt) {
assert_true(open);
open = false;
assert_true(evt.wasClean);
tOuter.done();
ws.onerror = tOpen.step_func_done(function() {
assert_unreached('web socket error');
});
tOuter.done();
}
......@@ -14,16 +14,19 @@ function run(tOuter) {
ws.send(data);
assert_equals(ws.bufferedAmount, data.length);
tData = async_test(defProperties.expandedName + '-check-data');
ws.onmessage = tData.step_func_done(function(evt) {
assert_equals(evt.data, data);
ws.close();
tDone = async_test(defProperties.expandedName + '-check-done');
ws.onclose = tDone.step_func_done(function(evt) {
assert_true(open);
open = false;
assert_true(evt.wasClean);
});
});
});
ws.onmessage = tData.step_func_done(function(evt) {
assert_equals(evt.data, data);
ws.close();
tDone = async_test(defProperties.expandedName + '-check-done');
});
ws.onclose = tDone.step_func_done(function(evt) {
assert_true(open);
open = false;
assert_true(evt.wasClean);
tOuter.done();
ws.onerror = tOpen.step_func_done(function() {
assert_unreached('web socket error');
});
tOuter.done();
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment