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

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

Issue 1301393002: Expose durable storage to workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update webexposed lists Created 5 years, 4 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 | Annotate | Revision Log
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("requestPersistent" in navigator.storage); },
jsbell 2015/08/21 19:05:28 On the TODO list (but low priority): we should add
7 "navigator.storage.requestPersistent should not exist in workers");
8
9 promise_test(function() {
10 var promise = navigator.storage.persistentPermission();
11 assert_true(promise instanceof Promise,
12 "navigator.storage.persistentPermission() 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, "string", result + " should be a string");
18 assert_greater_than(result.length, 0, "result should have length >0");
19 });
20 }, "navigator.storage.persistentPermission returns a promise that resolves.");
21
22 done();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698