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

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

Issue 2718013004: PaymentApp: Implement respondWith() in PaymentRequestEvent. (content side) (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 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 const std::string& notification_id, 230 const std::string& notification_id,
231 const PlatformNotificationData& notification_data, 231 const PlatformNotificationData& notification_data,
232 const mojom::ServiceWorkerEventDispatcher:: 232 const mojom::ServiceWorkerEventDispatcher::
233 DispatchNotificationCloseEventCallback& callback); 233 DispatchNotificationCloseEventCallback& callback);
234 virtual void OnPushEvent( 234 virtual void OnPushEvent(
235 const PushEventPayload& payload, 235 const PushEventPayload& payload,
236 const mojom::ServiceWorkerEventDispatcher::DispatchPushEventCallback& 236 const mojom::ServiceWorkerEventDispatcher::DispatchPushEventCallback&
237 callback); 237 callback);
238 virtual void OnPaymentRequestEvent( 238 virtual void OnPaymentRequestEvent(
239 payments::mojom::PaymentAppRequestPtr data, 239 payments::mojom::PaymentAppRequestPtr data,
240 payments::mojom::PaymentAppResponseCallbackPtr response_callback,
240 const mojom::ServiceWorkerEventDispatcher:: 241 const mojom::ServiceWorkerEventDispatcher::
241 DispatchPaymentRequestEventCallback& callback); 242 DispatchPaymentRequestEventCallback& callback);
242 243
243 // These functions simulate sending an EmbeddedHostMsg message through the 244 // These functions simulate sending an EmbeddedHostMsg message through the
244 // legacy IPC system to the browser. 245 // legacy IPC system to the browser.
245 void SimulateWorkerReadyForInspection(int embedded_worker_id); 246 void SimulateWorkerReadyForInspection(int embedded_worker_id);
246 void SimulateWorkerScriptCached(int embedded_worker_id); 247 void SimulateWorkerScriptCached(int embedded_worker_id);
247 void SimulateWorkerScriptLoaded(int embedded_worker_id); 248 void SimulateWorkerScriptLoaded(int embedded_worker_id);
248 void SimulateWorkerThreadStarted(int thread_id, int embedded_worker_id); 249 void SimulateWorkerThreadStarted(int thread_id, int embedded_worker_id);
249 void SimulateWorkerScriptEvaluated(int embedded_worker_id, bool success); 250 void SimulateWorkerScriptEvaluated(int embedded_worker_id, bool success);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 const std::string& notification_id, 308 const std::string& notification_id,
308 const PlatformNotificationData& notification_data, 309 const PlatformNotificationData& notification_data,
309 const mojom::ServiceWorkerEventDispatcher:: 310 const mojom::ServiceWorkerEventDispatcher::
310 DispatchNotificationCloseEventCallback& callback); 311 DispatchNotificationCloseEventCallback& callback);
311 void OnPushEventStub( 312 void OnPushEventStub(
312 const PushEventPayload& payload, 313 const PushEventPayload& payload,
313 const mojom::ServiceWorkerEventDispatcher::DispatchPushEventCallback& 314 const mojom::ServiceWorkerEventDispatcher::DispatchPushEventCallback&
314 callback); 315 callback);
315 void OnPaymentRequestEventStub( 316 void OnPaymentRequestEventStub(
316 payments::mojom::PaymentAppRequestPtr data, 317 payments::mojom::PaymentAppRequestPtr data,
318 payments::mojom::PaymentAppResponseCallbackPtr response_callback,
317 const mojom::ServiceWorkerEventDispatcher:: 319 const mojom::ServiceWorkerEventDispatcher::
318 DispatchPaymentRequestEventCallback& callback); 320 DispatchPaymentRequestEventCallback& callback);
319 321
320 std::unique_ptr<service_manager::InterfaceRegistry> CreateInterfaceRegistry( 322 std::unique_ptr<service_manager::InterfaceRegistry> CreateInterfaceRegistry(
321 MockRenderProcessHost* rph); 323 MockRenderProcessHost* rph);
322 324
323 std::unique_ptr<TestBrowserContext> browser_context_; 325 std::unique_ptr<TestBrowserContext> browser_context_;
324 std::unique_ptr<MockRenderProcessHost> render_process_host_; 326 std::unique_ptr<MockRenderProcessHost> render_process_host_;
325 std::unique_ptr<MockRenderProcessHost> new_render_process_host_; 327 std::unique_ptr<MockRenderProcessHost> new_render_process_host_;
326 328
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 std::unique_ptr<MockType> mock = 367 std::unique_ptr<MockType> mock =
366 base::MakeUnique<MockType>(std::forward<Args>(args)...); 368 base::MakeUnique<MockType>(std::forward<Args>(args)...);
367 MockType* mock_rawptr = mock.get(); 369 MockType* mock_rawptr = mock.get();
368 RegisterMockInstanceClient(std::move(mock)); 370 RegisterMockInstanceClient(std::move(mock));
369 return mock_rawptr; 371 return mock_rawptr;
370 } 372 }
371 373
372 } // namespace content 374 } // namespace content
373 375
374 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 376 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698