blob: 6d946f1f69bfce675dec211ab952ca6a555b7b8b [file] [log] [blame]
<script src="../fast/js/resources/js-test-pre.js"></script>
description("This tests querying usage and quota using Quota API.");
function errorCallback(error)
testFailed("Error occurred: " + error);
var returnedUsage, returnedQuota;
function usageCallback(usage, quota)
returnedUsage = usage;
returnedQuota = quota;
// Usage should be 0 (if other storage tests have correctly cleaned up their test data before exiting).
shouldBe("returnedUsage", "0");
// Quota value would vary depending on the test environment.
shouldBeGreaterThanOrEqual("returnedQuota", "returnedUsage");
if (navigator.webkitTemporaryStorage) {
window.jsTestIsAsync = true;
navigator.webkitTemporaryStorage.queryUsageAndQuota(usageCallback, errorCallback);
window.successfullyParsed = true;
<script src="../fast/js/resources/js-test-post.js"></script>