Bug 1770047 [wpt PR 34117] - [Clipboard API] Clipboard Web Custom Formats implementat...
[gecko.git] / testing / web-platform / tests / native-io / write_getLength_async_basic.tentative.https.any.js
blob428d63ebd577fa12d7d9d8b42e35011cab16111f
1 // META: title=Synchronous NativeIO API: getLength reports written bytes.
2 // META: global=window,worker
3 // META: script=resources/support.js
5 'use strict';
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');