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

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

Issue 2637743002: ServiceWorker: remove EmbeddedWorkerMsg_StartWorker (Closed)
Patch Set: Remove SendStartWorker from EWRegistry Created 3 years, 11 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
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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 void SimulateWorkerScriptLoaded(int embedded_worker_id); 202 void SimulateWorkerScriptLoaded(int embedded_worker_id);
203 void SimulateWorkerThreadStarted(int thread_id, int embedded_worker_id); 203 void SimulateWorkerThreadStarted(int thread_id, int embedded_worker_id);
204 void SimulateWorkerScriptEvaluated(int embedded_worker_id, bool success); 204 void SimulateWorkerScriptEvaluated(int embedded_worker_id, bool success);
205 void SimulateWorkerStarted(int embedded_worker_id); 205 void SimulateWorkerStarted(int embedded_worker_id);
206 void SimulateWorkerStopped(int embedded_worker_id); 206 void SimulateWorkerStopped(int embedded_worker_id);
207 void SimulateSend(IPC::Message* message); 207 void SimulateSend(IPC::Message* message);
208 208
209 EmbeddedWorkerRegistry* registry(); 209 EmbeddedWorkerRegistry* registry();
210 210
211 private: 211 private:
212 class MockEmbeddedWorkerSetup;
213 class MockServiceWorkerEventDispatcher; 212 class MockServiceWorkerEventDispatcher;
214 213
215 void OnStartWorkerStub(const EmbeddedWorkerStartParams& params, 214 void OnStartWorkerStub(const EmbeddedWorkerStartParams& params,
216 mojom::ServiceWorkerEventDispatcherRequest request); 215 mojom::ServiceWorkerEventDispatcherRequest request);
217 void OnResumeAfterDownloadStub(int embedded_worker_id); 216 void OnResumeAfterDownloadStub(int embedded_worker_id);
218 void OnStopWorkerStub( 217 void OnStopWorkerStub(
219 const mojom::EmbeddedWorkerInstanceClient::StopWorkerCallback& callback); 218 const mojom::EmbeddedWorkerInstanceClient::StopWorkerCallback& callback);
220 void OnMessageToWorkerStub(int thread_id, 219 void OnMessageToWorkerStub(int thread_id,
221 int embedded_worker_id, 220 int embedded_worker_id,
222 const IPC::Message& message); 221 const IPC::Message& message);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 std::unique_ptr<MockType> mock = 283 std::unique_ptr<MockType> mock =
285 base::MakeUnique<MockType>(std::forward<Args>(args)...); 284 base::MakeUnique<MockType>(std::forward<Args>(args)...);
286 MockType* mock_rawptr = mock.get(); 285 MockType* mock_rawptr = mock.get();
287 RegisterMockInstanceClient(std::move(mock)); 286 RegisterMockInstanceClient(std::move(mock));
288 return mock_rawptr; 287 return mock_rawptr;
289 } 288 }
290 289
291 } // namespace content 290 } // namespace content
292 291
293 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 292 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698