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

Unified Diff: content/test/data/service_worker/fetch_event_rejected.js

Issue 1081953004: Add tests for console messages of waitUntil() and respondWith() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: content/test/data/service_worker/fetch_event_rejected.js
diff --git a/content/test/data/service_worker/worker_activate_rejected.js b/content/test/data/service_worker/fetch_event_rejected.js
similarity index 50%
copy from content/test/data/service_worker/worker_activate_rejected.js
copy to content/test/data/service_worker/fetch_event_rejected.js
index a5c0f58ea38aaaa9d3f94c46c3a8175bdef8dada..9f4275456954e2ee718c13c010b8eb8b9f1b7801 100644
--- a/content/test/data/service_worker/worker_activate_rejected.js
+++ b/content/test/data/service_worker/fetch_event_rejected.js
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-this.onactivate = function(event) {
- event.waitUntil(new Promise(function(resolve, reject) {
- setTimeout(reject, 5);
+this.onfetch = function(event) {
+ event.respondWith(new Promise(function(resolve, reject) {
+ setTimeout(function() { reject("Rejecting respondWith promise"); }, 5);
}));
};

Powered by Google App Engine
This is Rietveld 408576698