blob: 3b1f4c638ef725c399fce9b4e04e19730ff17055 [file] [log] [blame]
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("This tests requesting a quota using Quota API.");
function errorCallback(error)
{
testFailed("Error occurred: " + error);
finishJSTest();
}
var grantedQuota;
function quotaCallback(newQuota)
{
grantedQuota = newQuota;
// We must be given 0 quota, the same amount as we requested.
shouldBe("grantedQuota", "0");
finishJSTest();
}
if (navigator.webkitTemporaryStorage) {
window.jsTestIsAsync = true;
// Requesting '0' quota for testing (this request must be almost always granted without showing any platform specific notification UI).
navigator.webkitTemporaryStorage.requestQuota(0, quotaCallback, errorCallback);
}
window.successfullyParsed = true;
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>