diff options
Diffstat (limited to 'dom/quota/test/modules/content/Utils.js')
-rw-r--r-- | dom/quota/test/modules/content/Utils.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/dom/quota/test/modules/content/Utils.js b/dom/quota/test/modules/content/Utils.js new file mode 100644 index 0000000000..3f011e32f4 --- /dev/null +++ b/dom/quota/test/modules/content/Utils.js @@ -0,0 +1,14 @@ +/** + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +import { getUsageForOrigin } from "/tests/dom/quota/test/modules/StorageUtils.js"; + +export const Utils = { + async getCachedOriginUsage() { + const principal = SpecialPowers.wrap(document).nodePrincipal; + const result = await getUsageForOrigin(principal, true); + return result.usage; + }, +}; |