summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/storage/storagemanager-persist.https.window.js
blob: 13e17a16e14198e21b0b5984ed46c93a50daed41 (plain)
1
2
3
4
5
6
7
8
9
10
// META: title=StorageManager: persist()

promise_test(function() {
    var promise = navigator.storage.persist();
    assert_true(promise instanceof Promise,
        'navigator.storage.persist() returned a Promise.');
    return promise.then(function(result) {
        assert_equals(typeof result, 'boolean', result + ' should be boolean');
    });
}, 'navigator.storage.persist() returns a promise that resolves.');