1
0
Fork 0
firefox/testing/web-platform/tests/webmessaging/message-channels/dictionary-transferrable.any.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

13 lines
351 B
JavaScript

// 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();
});