blob: 835d04bda3d8aa992be53042a07d098f29f46a0e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<html>
<head>
<script src="../fast/js/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="../fast/js/resources/js-test-post.js"></script>
</body>
</html>
|