1 // META: title=Synchronous NativeIO API: getLength reports written bytes.
2 // META: global=window,worker
3 // META: script=resources/support.js
7 promise_test(async testCase => {
8 await reserveAndCleanupCapacity(testCase);
10 const file = await createFile(testCase, 'test_file', [64, 65, 66, 67]);
12 const length = await file.getLength();
13 assert_equals(length, 4,
14 'NativeIOFile.getLength() should return the number of' +
15 ' bytes in the file');
16 }, 'NativeIOFile.getLength returns number of bytes written by' +
17 'NativeIOFile.write');