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

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

Issue 617263002: Support WebServiceWorkerResponseType in ServiceWorkerCache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't run test on windows, see https://crbug.com/416940 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 | « content/browser/DEPS ('k') | 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 140 }
141 141
142 void EmbeddedWorkerTestHelper::OnFetchEvent( 142 void EmbeddedWorkerTestHelper::OnFetchEvent(
143 int embedded_worker_id, 143 int embedded_worker_id,
144 int request_id, 144 int request_id,
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( 150 ServiceWorkerResponse(GURL(""),
151 GURL(""), 200, "OK", ServiceWorkerHeaderMap(), std::string()))); 151 200,
152 "OK",
153 blink::WebServiceWorkerResponseTypeDefault,
154 ServiceWorkerHeaderMap(),
155 std::string())));
152 } 156 }
153 157
154 void EmbeddedWorkerTestHelper::SimulatePausedAfterDownload( 158 void EmbeddedWorkerTestHelper::SimulatePausedAfterDownload(
155 int embedded_worker_id) { 159 int embedded_worker_id) {
156 EmbeddedWorkerInstance* worker = registry()->GetWorker(embedded_worker_id); 160 EmbeddedWorkerInstance* worker = registry()->GetWorker(embedded_worker_id);
157 ASSERT_TRUE(worker != NULL); 161 ASSERT_TRUE(worker != NULL);
158 registry()->OnPausedAfterDownload(worker->process_id(), embedded_worker_id); 162 registry()->OnPausedAfterDownload(worker->process_id(), embedded_worker_id);
159 } 163 }
160 164
161 void EmbeddedWorkerTestHelper::SimulateWorkerReadyForInspection( 165 void EmbeddedWorkerTestHelper::SimulateWorkerReadyForInspection(
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 request_id, 286 request_id,
283 request)); 287 request));
284 } 288 }
285 289
286 EmbeddedWorkerRegistry* EmbeddedWorkerTestHelper::registry() { 290 EmbeddedWorkerRegistry* EmbeddedWorkerTestHelper::registry() {
287 DCHECK(context()); 291 DCHECK(context());
288 return context()->embedded_worker_registry(); 292 return context()->embedded_worker_registry();
289 } 293 }
290 294
291 } // namespace content 295 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/service_worker/service_worker_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698