Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Side by Side Diff: LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js

Issue 647493002: Move promise_test and assert_promise_rejects out of worker-test-harness. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@geofencing_serviceworker
Patch Set: rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698