Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / quota / storagequota-request-quota.html
blob9d6805cb544501dbb546ca403a413faca41772e1
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 </head>
5 <body>
6 <script>
8 description("This tests requesting a quota using Quota API.");
10 function errorCallback(error)
12 testFailed("Error occurred: " + error);
13 finishJSTest();
16 var grantedQuota;
17 function quotaCallback(newQuota)
19 grantedQuota = newQuota;
21 // We must be given 0 quota, the same amount as we requested.
22 shouldBe("grantedQuota", "0");
24 finishJSTest();
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;
36 </script>
37 </body>
38 </html>