OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>requestPersistent returns a promise that is fulfilled</title> |
| 3 <script src="../../resources/testharness.js"></script> |
| 4 <script src="../../resources/testharnessreport.js"></script> |
| 5 <script type="text/javascript"> |
| 6 |
| 7 test(function() { assert_true(!!navigator.storage); }, "These tests requires nav
igator.storage"); |
| 8 |
| 9 promise_test(function() { |
| 10 var promise = navigator.storage.requestPersistent(); |
| 11 assert_true(promise instanceof Promise, "navigator.storage.requestPersistent
() returned a Promise.") |
| 12 return promise; |
| 13 }, "navigator.storage.requestPersistent returns a promise that resolves."); |
| 14 |
| 15 promise_test(function() { |
| 16 var promise = navigator.storage.persistentPermission(); |
| 17 assert_true(promise instanceof Promise, "navigator.storage.persistentPermiss
ion() returned a Promise.") |
| 18 return promise; |
| 19 }, "navigator.storage.persistentPermission returns a promise that resolves."); |
| 20 |
| 21 </script> |
OLD | NEW |