mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 05:08:36 +02:00
Automatic update from web-platform-testsStorage API: Use .any.js (etc) in Web Platform Tests Use ".any.js" tests [1] rather than redundant files for window and worker variations, and increase coverage where window-only tests existed. Also use ".worker.js" and ".window.js" to eliminate some boilerplate. The one manual test is left untouched for ease of running... manually. [1] https://web-platform-tests.org/writing-tests/testharness.html Change-Id: I7be790e0134854c804dbf82072589f07fa6e0bfb Reviewed-on: https://chromium-review.googlesource.com/1194324 Reviewed-by: Chase Phillips <cmp@chromium.org> Commit-Queue: Joshua Bell <jsbell@chromium.org> Cr-Commit-Position: refs/heads/master@{#586773} -- wpt-commits: ba92a402d8f994a92c73b22a153fd7aea89247c3 wpt-pr: 12723
13 lines
535 B
JavaScript
13 lines
535 B
JavaScript
// 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');
|