| Index: third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-storage.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-storage.js b/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-storage.js
|
| index f8db82d1f6cab061b1fcc83183678aa71e523880..673cf50f01ca85146983862c9de6bb81967c6002 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-storage.js
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-storage.js
|
| @@ -16,6 +16,40 @@ promise_test(function(t) {
|
| }, 'CacheStorage.open');
|
|
|
| promise_test(function(t) {
|
| + var cache_name = 'cache-storage/bar';
|
| + var first_cache = null;
|
| + var second_cache = null;
|
| + return self.caches.open(cache_name)
|
| + .then(function(cache) {
|
| + first_cache = cache;
|
| + return self.caches.delete(cache_name);
|
| + })
|
| + .then(function() {
|
| + return first_cache.add('../resources/simple.txt');
|
| + })
|
| + .then(function() {
|
| + return self.caches.keys();
|
| + })
|
| + .then(function(cache_names) {
|
| + assert_equals(cache_names.indexOf(cache_name), -1);
|
| + return self.caches.open(cache_name);
|
| + })
|
| + .then(function(cache) {
|
| + second_cache = cache;
|
| + return second_cache.keys();
|
| + })
|
| + .then(function(keys) {
|
| + assert_equals(keys.length, 0);
|
| + return first_cache.keys();
|
| + })
|
| + .then(function(keys) {
|
| + assert_equals(keys.length, 1);
|
| + // Clean up
|
| + return self.caches.delete(cache_name);
|
| + })
|
| + }, 'CacheStorage.delete dooms');
|
| +
|
| +promise_test(function(t) {
|
| // Note that this test may collide with other tests running in the same
|
| // origin that also uses an empty cache name.
|
| var cache_name = '';
|
|
|