Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / quota / storagequota-query-usage.html
blob88ec2579ac7ccec16f3f9afbc5d96907dd61677b
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 </head>
5 <body>
6 <script>
8 description("This tests querying usage and quota using Quota API.");
10 function errorCallback(error)
12 testFailed("Error occurred: " + error);
13 finishJSTest();
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");
26 finishJSTest();
29 if (navigator.webkitTemporaryStorage) {
30 window.jsTestIsAsync = true;
31 navigator.webkitTemporaryStorage.queryUsageAndQuota(usageCallback, errorCallback);
34 window.successfullyParsed = true;
36 </script>
37 </body>
38 </html>