Revision ef8e988d1fa60461cb2275fa85542309a05bf04b authored by Mike Pennisi on 03 April 2018, 22:15:29 UTC, committed by Mike Pennisi on 03 April 2018, 22:15:29 UTC
1 parent 81e900a
Raw File
storage-persisted.js
if (this.document === undefined) {
  importScripts("/resources/testharness.js");
}

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');

done();
back to top