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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/cachestorage/resources/test-helpers.js

Issue 2520093002: Make Cache Storage tests resilient to execution order (Closed)
Patch Set: Rename string, add comment and helper Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/cachestorage/resources/test-helpers.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/cachestorage/resources/test-helpers.js b/third_party/WebKit/LayoutTests/http/tests/cachestorage/resources/test-helpers.js
index a73889773d20e9cb91a042febe6bebaeb59d7bf5..61ddd123a350e4d8491153c05fbd6164a30bde5a 100644
--- a/third_party/WebKit/LayoutTests/http/tests/cachestorage/resources/test-helpers.js
+++ b/third_party/WebKit/LayoutTests/http/tests/cachestorage/resources/test-helpers.js
@@ -292,3 +292,11 @@ function assert_request_in_array(actual, expected_array, description) {
}
}), description);
}
+
+// Deletes all caches, returning a promise indicating success.
+function delete_all_caches() {
+ return self.caches.keys()
+ .then(function(keys) {
+ return Promise.all(keys.map(self.caches.delete.bind(self.caches)));
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698