vt => {
    assert_false(evt.data.startsWith('FAIL'));
    return new Promise(resolve => worker.onmessage = resolve);
  }).then(evt => {
    assert_equals(evt.data.operation, 'find-edges');
    assert_true(ArrayBuffer.prototype.isPrototypeOf(evt.data.input));
    assert_equals(evt.data.input.byteLength, 20);
    assert_equals(evt.data.threshold, 0.6);
  });
}, 'Tests sending structure message to/from worker.');
</script>
