OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <head> | |
3 <script src="../../resources/js-test.js"></script> | |
jsbell
2015/07/01 17:43:29
Can you implement this as a testharness.js test in
dgrogan
2015/07/07 04:03:24
I switched to a tiny testharness test but it's not
| |
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 |