Unexpected constructor / instanceof behavior when retrieving indexedDB data in an...
[WebKit-https.git] / LayoutTests / storage / storagequota-request-quota.html
1 <html>
2 <head>
3 <script src="../resources/js-test-pre.js"></script>
4 </head>
5 <body>
6 <script>
7
8 description("This tests requesting a quota using Quota API.");
9
10 function errorCallback(error)
11 {
12     testFailed("Error occurred: " + error);
13     finishJSTest();
14 }
15
16 var grantedQuota;
17 function quotaCallback(newQuota)
18 {
19     grantedQuota = newQuota;
20
21     // We must be given 0 quota, the same amount as we requested.
22     shouldBe("grantedQuota", "0");
23
24     finishJSTest();
25 }
26
27 if (navigator.webkitTemporaryStorage) {
28     window.jsTestIsAsync = true;
29
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);
32 }
33
34 window.successfullyParsed = true;
35
36 </script>
37 <script src="../resources/js-test-post.js"></script>
38 </body>
39 </html>