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

Unified Diff: content/browser/service_worker/service_worker_url_request_job_unittest.cc

Issue 2417793002: Introduce FetchEventPreloadHandle to pass the preload response to FetchEvent. (Closed)
Patch Set: incorporated dchecng's comment Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_url_request_job_unittest.cc
diff --git a/content/browser/service_worker/service_worker_url_request_job_unittest.cc b/content/browser/service_worker/service_worker_url_request_job_unittest.cc
index 639b3cb20a35943022bdcd93f457f4952ec07691..1bbbe28bb47e97ddaf4e9b6cc524753236bd17d3 100644
--- a/content/browser/service_worker/service_worker_url_request_job_unittest.cc
+++ b/content/browser/service_worker/service_worker_url_request_job_unittest.cc
@@ -366,6 +366,7 @@ class ProviderDeleteHelper : public EmbeddedWorkerTestHelper {
void OnFetchEvent(int embedded_worker_id,
int fetch_event_id,
const ServiceWorkerFetchRequest& request,
+ mojom::FetchEventPreloadHandlePtr preload_handle,
const FetchCallback& callback) override {
context()->RemoveProviderHost(mock_render_process_id(), kProviderID);
SimulateSend(new ServiceWorkerHostMsg_FetchEventResponse(
@@ -449,6 +450,7 @@ class BlobResponder : public EmbeddedWorkerTestHelper {
void OnFetchEvent(int embedded_worker_id,
int fetch_event_id,
const ServiceWorkerFetchRequest& request,
+ mojom::FetchEventPreloadHandlePtr preload_handle,
const FetchCallback& callback) override {
SimulateSend(new ServiceWorkerHostMsg_FetchEventResponse(
embedded_worker_id, fetch_event_id,
@@ -531,6 +533,7 @@ class StreamResponder : public EmbeddedWorkerTestHelper {
void OnFetchEvent(int embedded_worker_id,
int fetch_event_id,
const ServiceWorkerFetchRequest& request,
+ mojom::FetchEventPreloadHandlePtr preload_handle,
const FetchCallback& callback) override {
SimulateSend(new ServiceWorkerHostMsg_FetchEventResponse(
embedded_worker_id, fetch_event_id,
@@ -844,6 +847,7 @@ class FailFetchHelper : public EmbeddedWorkerTestHelper {
void OnFetchEvent(int embedded_worker_id,
int fetch_event_id,
const ServiceWorkerFetchRequest& request,
+ mojom::FetchEventPreloadHandlePtr preload_handle,
const FetchCallback& callback) override {
SimulateWorkerStopped(embedded_worker_id);
callback.Run(SERVICE_WORKER_ERROR_ABORT, base::Time::Now());
@@ -956,6 +960,7 @@ class EarlyResponseHelper : public EmbeddedWorkerTestHelper {
void OnFetchEvent(int embedded_worker_id,
int fetch_event_id,
const ServiceWorkerFetchRequest& request,
+ mojom::FetchEventPreloadHandlePtr preload_handle,
const FetchCallback& callback) override {
callback_ = callback;
SimulateSend(new ServiceWorkerHostMsg_FetchEventResponse(
@@ -1030,6 +1035,7 @@ class DelayedResponseHelper : public EmbeddedWorkerTestHelper {
void OnFetchEvent(int embedded_worker_id,
int fetch_event_id,
const ServiceWorkerFetchRequest& request,
+ mojom::FetchEventPreloadHandlePtr preload_handle,
const FetchCallback& callback) override {
embedded_worker_id_ = embedded_worker_id;
fetch_event_id_ = fetch_event_id;

Powered by Google App Engine
This is Rietveld 408576698