3 <script src=
"../../resources/js-test.js"></script>
8 description("This tests requesting a quota using Quota API.");
10 function errorCallback(error
)
12 testFailed("Error occurred: " + error
);
17 function quotaCallback(newQuota
)
19 grantedQuota
= newQuota
;
21 // We must be given 0 quota, the same amount as we requested.
22 shouldBe("grantedQuota", "0");
27 if (navigator
.webkitTemporaryStorage
) {
28 window
.jsTestIsAsync
= true;
30 // Requesting '0' quota for testing (this request must be almost always granted without showing any platform specific notification UI).
31 navigator
.webkitTemporaryStorage
.requestQuota(0, quotaCallback
, errorCallback
);
34 window
.successfullyParsed
= true;