<!DOCTYPE html>
<title>Mojo shared buffer tests</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
let kBufferSize = 32;
test(() => {
let {handle} = Mojo.createSharedBuffer(kBufferSize);
let {result, buffer} = handle.mapBuffer(kBufferSize, kBufferSize);
assert_equals(result, Mojo.RESULT_INVALID_ARGUMENT);
assert_equals(buffer, undefined);
}, "Attempt to map beyond buffer size does not crash");
</script>