Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/storage/resources/durability-worker.js

Issue 2805353003: Upstream navigator.storage.persist()/persisted() tests to WPT (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/storage/durability-workers.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 importScripts("/resources/testharness.js");
2
3 test(function() { assert_true("storage" in navigator); },
4 "These worker tests require navigator.storage");
5
6 test(function() { assert_false("persist" in navigator.storage); },
7 "navigator.storage.persist should not exist in workers");
8
9 promise_test(function() {
10 var promise = navigator.storage.persisted();
11 assert_true(promise instanceof Promise,
12 "navigator.storage.persisted() returned a Promise.");
13 return promise.then(function (result) {
14 // Layout tests get canned results, not the value per spec. So testing
15 // their values here would only be testing our test plumbing. But we can
16 // test that the type of the returned value is correct.
17 assert_equals(typeof result, "boolean", result + " should be a boolean") ;
18 });
19 }, "navigator.storage.persisted returns a promise that resolves.");
20
21 done();
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/storage/durability-workers.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698