OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../resources/js-test.js"></script> |
| 4 </head> |
| 5 <body> |
| 6 <script type="text/javascript"> |
| 7 description("This tests durability."); |
| 8 |
| 9 var usage; |
| 10 var grantedQuota; |
| 11 |
| 12 function onrejected(error) { |
| 13 testFailed(error.name + ": " + error.message); |
| 14 finishJSTest(); |
| 15 } |
| 16 |
| 17 function runTest() { |
| 18 debug("calling requestDurability"); |
| 19 navigator.storage.requestPersistent().then(function(adfs) { |
| 20 testPassed("then got called"); |
| 21 finishJSTest(); |
| 22 }, onrejected); |
| 23 } |
| 24 |
| 25 if (navigator.storage) { |
| 26 window.jsTestIsAsync = true; |
| 27 runTest(); |
| 28 } else { |
| 29 testFailed("This test requires navigator.storage."); |
| 30 } |
| 31 </script> |
| 32 </body> |
| 33 </html> |
OLD | NEW |