| 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 1e3280c99ed0a35fbb3dec36c2afb6265e5b4ff5..559a787afc312d49dac60e2653b69be99becc112 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
|
| @@ -115,20 +115,25 @@ promise_test(function(t) {
|
| cache = result;
|
| })
|
| .then(function() {
|
| - return self.caches.open(cache_name);
|
| - })
|
| - .then(function(result) {
|
| - assert_equals(result, cache,
|
| - 'CacheStorage.open should return the named Cache ' +
|
| - 'object if it exists.');
|
| + return cache.add('../resources/simple.txt');
|
| })
|
| .then(function() {
|
| return self.caches.open(cache_name);
|
| })
|
| .then(function(result) {
|
| - assert_equals(result, cache,
|
| - 'CacheStorage.open should return the same ' +
|
| - 'instance of an existing Cache object.');
|
| + assert_true(result instanceof Cache,
|
| + 'CacheStorage.open should return a Cache object');
|
| + assert_not_equals(result, cache,
|
| + 'CacheStorage.open should return a new Cache ' +
|
| + 'object each time its called.');
|
| + return Promise.all([cache.keys(), result.keys()]);
|
| + })
|
| + .then(function(results) {
|
| + var expected_urls = results[0].map(function(r) { return r.url });
|
| + var actual_urls = results[1].map(function(r) { return r.url });
|
| + assert_array_equals(actual_urls, expected_urls,
|
| + 'CacheStorage.open should return a new Cache ' +
|
| + 'object for the same backing store.');
|
| });
|
| }, 'CacheStorage.open with existing cache');
|
|
|
|
|