3 <script src=
"../../resources/js-test.js"></script>
8 description("This tests querying usage and quota using Quota API.");
10 function errorCallback(error
)
12 testFailed("Error occurred: " + error
);
16 var returnedUsage
, returnedQuota
;
17 function usageCallback(usage
, quota
)
19 returnedUsage
= usage
;
20 returnedQuota
= quota
;
22 // Quota value would vary depending on the test environment.
23 shouldBeGreaterThanOrEqual("returnedUsage", "0");
24 shouldBeGreaterThanOrEqual("returnedQuota", "returnedUsage");
29 if (navigator
.webkitTemporaryStorage
) {
30 window
.jsTestIsAsync
= true;
31 navigator
.webkitTemporaryStorage
.queryUsageAndQuota(usageCallback
, errorCallback
);
34 window
.successfullyParsed
= true;