mirror of
https://github.com/servo/servo.git
synced 2025-09-04 12:08:21 +01:00
Update web-platform-tests to revision a46616a5b18e83587ddbbed756c7b96cbb4b015d
This commit is contained in:
parent
3f07cfec7c
commit
578498ba24
4001 changed files with 159517 additions and 30260 deletions
18
tests/wpt/web-platform-tests/storage/storage-persisted.js
Normal file
18
tests/wpt/web-platform-tests/storage/storage-persisted.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
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();
|
Loading…
Add table
Add a link
Reference in a new issue