OLD | NEW |
1 importScripts('worker-testharness.js'); | 1 if (self.importScripts) { |
2 importScripts('../../resources/testharness-helpers.js'); | 2 importScripts('/resources/testharness.js'); |
| 3 importScripts('/resources/testharness-helpers.js'); |
| 4 importScripts('../resources/test-helpers.js'); |
| 5 } |
3 | 6 |
4 promise_test(function(t) { | 7 promise_test(function(t) { |
5 var cache_name = 'cache-storage/foo'; | 8 var cache_name = 'cache-storage/foo'; |
6 return self.caches.delete(cache_name) | 9 return self.caches.delete(cache_name) |
7 .then(function() { | 10 .then(function() { |
8 return self.caches.open(cache_name); | 11 return self.caches.open(cache_name); |
9 }) | 12 }) |
10 .then(function(cache) { | 13 .then(function(cache) { |
11 assert_true(cache instanceof Cache, | 14 assert_true(cache instanceof Cache, |
12 'CacheStorage.open should return a Cache.'); | 15 'CacheStorage.open should return a Cache.'); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 .then(function(cache_exists) { | 181 .then(function(cache_exists) { |
179 assert_true(cache_exists, | 182 assert_true(cache_exists, |
180 'CacheStorage names should be not be converted.'); | 183 'CacheStorage names should be not be converted.'); |
181 }) | 184 }) |
182 .then(function() { return self.caches.has(converted_name); }) | 185 .then(function() { return self.caches.has(converted_name); }) |
183 .then(function(cache_exists) { | 186 .then(function(cache_exists) { |
184 assert_false(cache_exists, | 187 assert_false(cache_exists, |
185 'CacheStorage names should be not be converted.'); | 188 'CacheStorage names should be not be converted.'); |
186 }); | 189 }); |
187 }, 'CacheStorage names are DOMStrings not USVStrings'); | 190 }, 'CacheStorage names are DOMStrings not USVStrings'); |
| 191 |
| 192 done(); |
OLD | NEW |