Revision cf39c87ae4712892c3da1238e672dba932996ae5 authored by Maja Frydrychowicz on 11 April 2018, 09:34:00 UTC, committed by moz-wptsync-bot on 11 April 2018, 13:24:57 UTC
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1432105 gecko-commit: f6b8d9c6cbfa3b4a1b0437cee337ff636b3cfcbe gecko-integration-branch: central gecko-reviewers: whimboo
1 parent 7967c43
estimate-parallel.https.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>StorageManager: multiple estimate() calls in parallel</title>
<meta name="help" href="https://storage.spec.whatwg.org/#dom-storagemanager-estimate">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
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');
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...