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

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

Issue 178343011: Support dispatching ServiceWorker FetchEvent and receiving response (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use const for result on failure Created 6 years, 9 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
« no previous file with comments | « content/test/data/service_worker/fetch_event_error.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/service_worker/fetch_event_fallback.js
diff --git a/chrome/test/data/extensions/platform_apps/app_window/generic/index.js b/content/test/data/service_worker/fetch_event_fallback.js
similarity index 54%
copy from chrome/test/data/extensions/platform_apps/app_window/generic/index.js
copy to content/test/data/service_worker/fetch_event_fallback.js
index 54bd33540ec81cb933f50ae4abe9f3b4e7e19173..094bec9624a82cda12a7a4fcfafe4871171c9628 100644
--- a/chrome/test/data/extensions/platform_apps/app_window/generic/index.js
+++ b/content/test/data/service_worker/fetch_event_fallback.js
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-onload = function() {
- chrome.test.sendMessage('window_loaded');
+this.onfetch = function(event) {
+ event.respondWith('This is not a Response object, so browser should ' +
+ 'fallback to native');
};
« no previous file with comments | « content/test/data/service_worker/fetch_event_error.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698