summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/storage/estimate-parallel.https.any.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/storage/estimate-parallel.https.any.js')
-rw-r--r--testing/web-platform/tests/storage/estimate-parallel.https.any.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/web-platform/tests/storage/estimate-parallel.https.any.js b/testing/web-platform/tests/storage/estimate-parallel.https.any.js
new file mode 100644
index 0000000000..090f004b85
--- /dev/null
+++ b/testing/web-platform/tests/storage/estimate-parallel.https.any.js
@@ -0,0 +1,13 @@
+// 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');