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

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

Issue 2746783002: [ServiceWorker] Mojofy InstallEvent of Service Worker (Closed)
Patch Set: Rebase Created 3 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 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 62c16408a81413aa01fc595ed94ceea2d7e321b8..c8f37bd73e40d71d556033f3197f5dd4d5da711d 100644
--- a/content/browser/service_worker/embedded_worker_test_helper.h
+++ b/content/browser/service_worker/embedded_worker_test_helper.h
@@ -62,7 +62,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 */)>;
@@ -212,7 +212,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,
@@ -295,7 +297,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,
@@ -355,9 +359,6 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
mojom::EmbeddedWorkerInstanceHostAssociatedPtr /* instance_host_ptr */>
embedded_worker_id_instance_host_ptr_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