summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/storage/persisted.https.any.js
blob: 57e15f0e811de3e94652b2f16c5482a94be63c24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// META: title=StorageManager: persisted()

test(function(t) {
  assert_true('persisted' in navigator.storage);
  assert_equals(typeof navigator.storage.persisted, 'function');
  assert_true(navigator.storage.persisted() instanceof Promise);
}, 'persisted() method exists and returns a Promise');

promise_test(function(t) {
  return navigator.storage.persisted().then(function(result) {
    assert_equals(typeof result, 'boolean');
    assert_equals(result, false);
  });
}, 'persisted() returns a promise and resolves as boolean with false');