OLD | NEW |
1 importScripts('worker-testharness.js'); | 1 if (self.importScripts) { |
2 importScripts('../../resources/testharness-helpers.js'); | 2 importScripts('/resources/testharness.js'); |
3 importScripts('override_assert_object_equals.js'); | 3 importScripts('/resources/testharness-helpers.js'); |
| 4 importScripts('../resources/test-helpers.js'); |
| 5 } |
4 | 6 |
5 (function() { | 7 (function() { |
6 var next_index = 1; | 8 var next_index = 1; |
7 | 9 |
8 // Returns a transaction (request, response, and url) for a unique URL. | 10 // Returns a transaction (request, response, and url) for a unique URL. |
9 function create_unique_transaction(test) { | 11 function create_unique_transaction(test) { |
10 var uniquifier = String(next_index++); | 12 var uniquifier = String(next_index++); |
11 var url = 'http://example.com/' + uniquifier; | 13 var url = 'http://example.com/' + uniquifier; |
12 | 14 |
13 return { | 15 return { |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 }) | 112 }) |
111 .then(function(response) { | 113 .then(function(response) { |
112 assert_equals(response, undefined, | 114 assert_equals(response, undefined, |
113 'The response should not be found.'); | 115 'The response should not be found.'); |
114 return self.caches.has('foo'); | 116 return self.caches.has('foo'); |
115 }) | 117 }) |
116 .then(function(has_foo) { | 118 .then(function(has_foo) { |
117 assert_false(has_foo, "The cache should still not exist."); | 119 assert_false(has_foo, "The cache should still not exist."); |
118 }) | 120 }) |
119 }, 'CacheStorageMatch with no caches available but name provided'); | 121 }, 'CacheStorageMatch with no caches available but name provided'); |
| 122 |
| 123 done(); |
OLD | NEW |