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

Unified Diff: content/browser/service_worker/embedded_worker_test_helper.h

Issue 2746783002: [ServiceWorker] Mojofy InstallEvent of Service Worker (Closed)
Patch Set: Created 3 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
Index: content/browser/service_worker/embedded_worker_test_helper.h
diff --git a/content/browser/service_worker/embedded_worker_test_helper.h b/content/browser/service_worker/embedded_worker_test_helper.h
index 9a8af6542d3071764196204c33c8ea210c5ea561..4ab6035e1312fd4f665b1e7df1b5c5eb54bd789d 100644
--- a/content/browser/service_worker/embedded_worker_test_helper.h
+++ b/content/browser/service_worker/embedded_worker_test_helper.h
@@ -65,7 +65,7 @@ struct ServiceWorkerFetchRequest;
class EmbeddedWorkerTestHelper : public IPC::Sender,
public IPC::Listener {
public:
- enum class Event { Activate };
+ enum class Event { Install, Activate };
using FetchCallback =
base::Callback<void(ServiceWorkerStatusCode,
base::Time /* dispatch_event_time */)>;
@@ -193,7 +193,9 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
mojom::ExtendableMessageEventPtr event,
const mojom::ServiceWorkerEventDispatcher::
DispatchExtendableMessageEventCallback& callback);
- virtual void OnInstallEvent(int embedded_worker_id, int request_id);
+ virtual void OnInstallEvent(
+ const mojom::ServiceWorkerEventDispatcher::DispatchInstallEventCallback&
+ callback);
virtual void OnFetchEvent(int embedded_worker_id,
int fetch_event_id,
const ServiceWorkerFetchRequest& request,
@@ -251,7 +253,9 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
mojom::ExtendableMessageEventPtr event,
const mojom::ServiceWorkerEventDispatcher::
DispatchExtendableMessageEventCallback& callback);
- void OnInstallEventStub(int request_id);
+ void OnInstallEventStub(
+ const mojom::ServiceWorkerEventDispatcher::DispatchInstallEventCallback&
+ callback);
void OnFetchEventStub(int thread_id,
int fetch_event_id,
const ServiceWorkerFetchRequest& request,
@@ -310,9 +314,6 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
std::map<int /* thread_id */, int /* embedded_worker_id */>
thread_id_embedded_worker_id_map_;
- // Updated each time MessageToWorker message is received.
- int current_embedded_worker_id_;
-
std::vector<Event> events_;
base::WeakPtrFactory<EmbeddedWorkerTestHelper> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698