3 <script src=
"../../resources/js-test.js"></script>
6 <p id=
"description"></p>
7 <div id=
"console"></div>
8 <script type=
"text/javascript">
9 description("This tests webkitStorageInfo API works.");
11 function errorCallback(error
)
13 testFailed("Error occurred: " + error
);
19 function usageCallback(usage
, quota
)
21 returnedUsage
= usage
;
22 returnedQuota
= quota
;
24 // Quota value would vary depending on the test environment.
25 shouldBeGreaterThanOrEqual("returnedUsage", "0");
26 shouldBeGreaterThanOrEqual("returnedQuota", "returnedUsage");
31 if (window
.webkitStorageInfo
) {
32 window
.jsTestIsAsync
= true;
33 webkitStorageInfo
.queryUsageAndQuota(webkitStorageInfo
.TEMPORARY
, usageCallback
, errorCallback
);
35 debug("This test requires window.webkitStorageInfo.");