blob: bf49fddb99271fb16262a8029a97ba52041300eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// META: title=basic messagechannel with transfer
async_test(function(t) {
var channel = new MessageChannel();
var ab = new ArrayBuffer(1);
channel.port1.postMessage(ab, {transfer: [ab]});
channel.port2.onmessage = t.step_func(
function(e) {
assert_equals(e.data.byteLength, 1);
t.done();
});
channel.port2.start();
});
|