summaryrefslogtreecommitdiffstats
path: root/test/wpt/tests/storage/estimate-usage-details.https.tentative.any.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/wpt/tests/storage/estimate-usage-details.https.tentative.any.js')
-rw-r--r--test/wpt/tests/storage/estimate-usage-details.https.tentative.any.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/wpt/tests/storage/estimate-usage-details.https.tentative.any.js b/test/wpt/tests/storage/estimate-usage-details.https.tentative.any.js
new file mode 100644
index 0000000..2a1cea5
--- /dev/null
+++ b/test/wpt/tests/storage/estimate-usage-details.https.tentative.any.js
@@ -0,0 +1,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');