Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / cachestorage / script-tests / cache-storage-keys.js
blob51b06c3d4fb9f432b41d5921c662a61b2ca610e4
1 if (self.importScripts) {
2 importScripts('/resources/testharness.js');
3 importScripts('/resources/testharness-helpers.js');
4 importScripts('../resources/test-helpers.js');
7 var test_cache_list =
8 ['', 'example', 'Another cache name', 'A', 'a', 'ex ample'];
10 promise_test(function(test) {
11 return self.caches.keys()
12 .then(function(keys) {
13 assert_true(Array.isArray(keys),
14 'CacheStorage.keys should return an Array.');
15 return Promise.all(keys.map(function(key) {
16 return self.caches.delete(key);
17 }));
19 .then(function() {
20 return Promise.all(test_cache_list.map(function(key) {
21 return self.caches.open(key);
22 }));
25 .then(function() { return self.caches.keys(); })
26 .then(function(keys) {
27 assert_true(Array.isArray(keys),
28 'CacheStorage.keys should return an Array.');
29 assert_array_equals(keys,
30 test_cache_list,
31 'CacheStorage.keys should only return ' +
32 'existing caches.');
33 });
34 }, 'CacheStorage keys');
36 done();