OLD | NEW |
1 importScripts('worker-test-harness.js'); | 1 importScripts('worker-testharness.js'); |
| 2 importScripts('../../resources/testharness-helpers.js'); |
2 | 3 |
3 promise_test(function(t) { | 4 promise_test(function(t) { |
4 var cache_name = 'cache-storage/foo'; | 5 var cache_name = 'cache-storage/foo'; |
5 return self.caches.delete(cache_name) | 6 return self.caches.delete(cache_name) |
6 .then(function() { | 7 .then(function() { |
7 return self.caches.create(cache_name); | 8 return self.caches.create(cache_name); |
8 }) | 9 }) |
9 .then(function(cache) { | 10 .then(function(cache) { |
10 assert_true(cache instanceof Cache, | 11 assert_true(cache instanceof Cache, |
11 'CacheStorage.create should return a Cache.'); | 12 'CacheStorage.create should return a Cache.'); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 177 |
177 promise_test(function(t) { | 178 promise_test(function(t) { |
178 return self.caches.delete('cheezburger') | 179 return self.caches.delete('cheezburger') |
179 .then(function(result) { | 180 .then(function(result) { |
180 assert_false(result, | 181 assert_false(result, |
181 'CacheStorage.delete should return false for a ' + | 182 'CacheStorage.delete should return false for a ' + |
182 'nonexistent cache.'); | 183 'nonexistent cache.'); |
183 }); | 184 }); |
184 }, 'CacheStorage.delete with nonexistent cache'); | 185 }, 'CacheStorage.delete with nonexistent cache'); |
185 | 186 |
OLD | NEW |