1
0
Fork 0
firefox/testing/web-platform/tests/storage/estimate-parallel.https.any.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

13 lines
535 B
JavaScript

// META: title=StorageManager: multiple estimate() calls in parallel
promise_test(async t => {
let r1, r2;
await Promise.all([
navigator.storage.estimate().then(r => { r1 = r; }),
navigator.storage.estimate().then(r => { r2 = r; })
]);
assert_true(('usage' in r1) && ('quota' in r1),
'first response should have expected fields');
assert_true(('usage' in r2) && ('quota' in r2),
'second response should have expected fields');
}, 'Multiple estimate() calls in parallel should complete');