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

Side by Side Diff: content/browser/service_worker/embedded_worker_test_helper.cc

Issue 205563006: Add a status code to install event handled message from Service Worker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/service_worker/embedded_worker_test_helper.h" 5 #include "content/browser/service_worker/embedded_worker_test_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/service_worker/embedded_worker_instance.h" 8 #include "content/browser/service_worker/embedded_worker_instance.h"
9 #include "content/browser/service_worker/embedded_worker_registry.h" 9 #include "content/browser/service_worker/embedded_worker_registry.h"
10 #include "content/browser/service_worker/service_worker_context_core.h" 10 #include "content/browser/service_worker/service_worker_context_core.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 return handled; 87 return handled;
88 } 88 }
89 89
90 void EmbeddedWorkerTestHelper::OnInstallEvent( 90 void EmbeddedWorkerTestHelper::OnInstallEvent(
91 int embedded_worker_id, 91 int embedded_worker_id,
92 int request_id, 92 int request_id,
93 int active_version_embedded_worker_id) { 93 int active_version_embedded_worker_id) {
94 SimulateSendMessageToBrowser( 94 SimulateSendMessageToBrowser(
95 embedded_worker_id, 95 embedded_worker_id,
96 request_id, 96 request_id,
97 ServiceWorkerHostMsg_InstallEventFinished()); 97 ServiceWorkerHostMsg_InstallEventFinished(
98 SERVICE_WORKER_INSTALL_EVENT_RESULT_COMPLETED));
98 } 99 }
99 100
100 void EmbeddedWorkerTestHelper::OnFetchEvent( 101 void EmbeddedWorkerTestHelper::OnFetchEvent(
101 int embedded_worker_id, 102 int embedded_worker_id,
102 int request_id, 103 int request_id,
103 const ServiceWorkerFetchRequest& request) { 104 const ServiceWorkerFetchRequest& request) {
104 SimulateSendMessageToBrowser( 105 SimulateSendMessageToBrowser(
105 embedded_worker_id, 106 embedded_worker_id,
106 request_id, 107 request_id,
107 ServiceWorkerHostMsg_FetchEventFinished( 108 ServiceWorkerHostMsg_FetchEventFinished(
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 current_request_id_, 201 current_request_id_,
201 request)); 202 request));
202 } 203 }
203 204
204 EmbeddedWorkerRegistry* EmbeddedWorkerTestHelper::registry() { 205 EmbeddedWorkerRegistry* EmbeddedWorkerTestHelper::registry() {
205 DCHECK(context_); 206 DCHECK(context_);
206 return context_->embedded_worker_registry(); 207 return context_->embedded_worker_registry();
207 } 208 }
208 209
209 } // namespace content 210 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698