blob: 88ec2579ac7ccec16f3f9afbc5d96907dd61677b [file] [log] [blame]
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>
description("This tests querying usage and quota using Quota API.");
function errorCallback(error)
{
testFailed("Error occurred: " + error);
finishJSTest();
}
var returnedUsage, returnedQuota;
function usageCallback(usage, quota)
{
returnedUsage = usage;
returnedQuota = quota;
// Quota value would vary depending on the test environment.
shouldBeGreaterThanOrEqual("returnedUsage", "0");
shouldBeGreaterThanOrEqual("returnedQuota", "returnedUsage");
finishJSTest();
}
if (navigator.webkitTemporaryStorage) {
window.jsTestIsAsync = true;
navigator.webkitTemporaryStorage.queryUsageAndQuota(usageCallback, errorCallback);
}
window.successfullyParsed = true;
</script>
</body>
</html>