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

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

Issue 205033002: Browser side of new ServiceWorker 'sync' event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Kinuko comments 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/renderer/service_worker/service_worker_script_context.cc ('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/sync.js
diff --git a/content/test/data/service_worker/fetch_event.js b/content/test/data/service_worker/sync.js
similarity index 84%
copy from content/test/data/service_worker/fetch_event.js
copy to content/test/data/service_worker/sync.js
index 67408ddd80520ada8c0c0b990ea2a9d681354834..993e771778a505bc5ff78dedbe29a9d5655026fd 100644
--- a/content/test/data/service_worker/fetch_event.js
+++ b/content/test/data/service_worker/sync.js
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+var code = 404;
+
this.onfetch = function(event) {
response = new Response({
- statusCode: 200,
+ statusCode: code,
statusText: 'OK',
method: 'GET',
headers: {
@@ -17,3 +19,7 @@ this.onfetch = function(event) {
setTimeout(function() { r(response); }, 5);
}));
};
+
+this.onsync = function(event) {
+ code = 200;
+};
« no previous file with comments | « content/renderer/service_worker/service_worker_script_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698