summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/storage/estimate-usage-details.https.tentative.any.js
blob: 2a1cea5fb8dfa78c320328e667bb7ffd940802b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// 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');