Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /storage/estimate-usage-details.https.tentative.any.html - WPT Dashboard Interop Dashboard
- /storage/estimate-usage-details.https.tentative.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=StorageManager: estimate() should have usage details
promise_test(async t => {
const estimate = await navigator.storage.estimate();
assert_equals(typeof estimate, 'object');
assert_true('usage' in estimate);
assert_equals(typeof estimate.usage, 'number');
assert_true('quota' in estimate);
assert_equals(typeof estimate.quota, 'number');
assert_true('usageDetails' in estimate);
assert_equals(typeof estimate.usageDetails, 'object');
}, 'estimate() resolves to dictionary with members, including usageDetails');