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

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

Issue 622833002: ServiceWorkerCache: Support response body in blob form. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@opacity
Patch Set: Rebase Created 6 years, 2 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
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 const ServiceWorkerFetchRequest& request) { 145 const ServiceWorkerFetchRequest& request) {
146 SimulateSend(new ServiceWorkerHostMsg_FetchEventFinished( 146 SimulateSend(new ServiceWorkerHostMsg_FetchEventFinished(
147 embedded_worker_id, 147 embedded_worker_id,
148 request_id, 148 request_id,
149 SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE, 149 SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE,
150 ServiceWorkerResponse(GURL(""), 150 ServiceWorkerResponse(GURL(""),
151 200, 151 200,
152 "OK", 152 "OK",
153 blink::WebServiceWorkerResponseTypeDefault, 153 blink::WebServiceWorkerResponseTypeDefault,
154 ServiceWorkerHeaderMap(), 154 ServiceWorkerHeaderMap(),
155 std::string()))); 155 std::string(),
156 0)));
156 } 157 }
157 158
158 void EmbeddedWorkerTestHelper::SimulatePausedAfterDownload( 159 void EmbeddedWorkerTestHelper::SimulatePausedAfterDownload(
159 int embedded_worker_id) { 160 int embedded_worker_id) {
160 EmbeddedWorkerInstance* worker = registry()->GetWorker(embedded_worker_id); 161 EmbeddedWorkerInstance* worker = registry()->GetWorker(embedded_worker_id);
161 ASSERT_TRUE(worker != NULL); 162 ASSERT_TRUE(worker != NULL);
162 registry()->OnPausedAfterDownload(worker->process_id(), embedded_worker_id); 163 registry()->OnPausedAfterDownload(worker->process_id(), embedded_worker_id);
163 } 164 }
164 165
165 void EmbeddedWorkerTestHelper::SimulateWorkerReadyForInspection( 166 void EmbeddedWorkerTestHelper::SimulateWorkerReadyForInspection(
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 request_id, 287 request_id,
287 request)); 288 request));
288 } 289 }
289 290
290 EmbeddedWorkerRegistry* EmbeddedWorkerTestHelper::registry() { 291 EmbeddedWorkerRegistry* EmbeddedWorkerTestHelper::registry() {
291 DCHECK(context()); 292 DCHECK(context());
292 return context()->embedded_worker_registry(); 293 return context()->embedded_worker_registry();
293 } 294 }
294 295
295 } // namespace content 296 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698