gecko-dev/testing/web-platform/tests/storage/estimate-usage-details-application-cache.https.tentative.html
Jarryd d8362db9df Bug 1514436 [wpt PR 14531] - Reland "Add quota usage details tests for all other storage backends.", a=testonly
Automatic update from web-platform-tests
Reland "Add quota usage details tests for all other storage backends."

This is a reland of 548e7b5e622ad79155ff95ef26738d7a40fe9397

Original change's description:
> Add quota usage details tests for all other storage backends.
>
> IndexedDB test was included in parent CL.
>
> Bug: 904000
> Test:
> Change-Id: Icc3462f13d0dce0197a8ec54f22d5ad794a51292
> Reviewed-on: https://chromium-review.googlesource.com/c/1334659
> Reviewed-by: Victor Costan <pwnall@chromium.org>
> Reviewed-by: Joshua Bell <jsbell@chromium.org>
> Commit-Queue: Jarryd Goodman <jarrydg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#616398}

Bug: 904000
Change-Id: I507ec17eabc8e323a7c6418075d4be4787d4c5df
Reviewed-on: https://chromium-review.googlesource.com/c/1378805
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Jarryd Goodman <jarrydg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617285}

--

wpt-commits: 7e5cdeab733b40357f553704fddddf6c5f199c8b
wpt-pr: 14531
2019-02-07 21:50:57 +00:00

29 lines
986 B
HTML

<!doctype html>
<html>
<title>Quota Estimate: usage details reflect application cache changes.</title>
<meta charset='utf-8'>
<link rel='author' href='jarrydg@chromium.org' title='Jarryd Goodman'>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src='../cookie-store/resources/helpers.js'></script>
<script>
'use strict';
promise_test(async t => {
let estimate = await navigator.storage.estimate();
const usageBeforeCreate = estimate.usageDetails.applicationCache || 0;
const iframe = await
createIframe('./resources/iframe_with_appcache_manifest.html', t);
await waitForMessage();
estimate = await navigator.storage.estimate();
assert_true('applicationCache' in estimate.usageDetails);
const usageAfterCreate = estimate.usageDetails.applicationCache;
assert_greater_than(
usageAfterCreate, usageBeforeCreate);
}, 'estimate() shows usage increase after app is cached');
</script>
</html>