blob: 09e97fe6fe9639e1f1733f19b1260566f3146c85 [file] [log] [blame]
// META: title=Synchronous NativeIO API: getLength reports written bytes.
// META: global=dedicatedworker
// META: script=resources/support.js
'use strict';
test(testCase => {
reserveAndCleanupCapacitySync(testCase);
const file = createFileSync(testCase, 'test_file', [64, 65, 66, 67]);
const length = file.getLength();
assert_equals(length, 4,
'NativeIOFileSync.getLength() should return the number of' +
' bytes in the file.');
}, 'NativeIOFileSync.getLength returns the number bytes written by' +
' NativeIOFileSync.write');