Index: content/child/service_worker/service_worker_dispatcher_unittest.cc |
diff --git a/content/child/service_worker/service_worker_dispatcher_unittest.cc b/content/child/service_worker/service_worker_dispatcher_unittest.cc |
index 9f1558129739ef95284a5e189ef442c60655e906..93d25c286588cd1b251311159120bc990177775d 100644 |
--- a/content/child/service_worker/service_worker_dispatcher_unittest.cc |
+++ b/content/child/service_worker/service_worker_dispatcher_unittest.cc |
@@ -2,15 +2,16 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "content/child/service_worker/service_worker_dispatcher.h" |
#include "base/macros.h" |
#include "base/message_loop/message_loop.h" |
-#include "content/child/service_worker/service_worker_dispatcher.h" |
#include "content/child/service_worker/service_worker_handle_reference.h" |
#include "content/child/service_worker/service_worker_provider_context.h" |
#include "content/child/service_worker/web_service_worker_impl.h" |
#include "content/child/service_worker/web_service_worker_registration_impl.h" |
#include "content/child/thread_safe_sender.h" |
#include "content/common/service_worker/service_worker_messages.h" |
+#include "content/common/service_worker/service_worker_provider_interfaces.mojom.h" |
#include "content/common/service_worker/service_worker_types.h" |
#include "ipc/ipc_sync_message_filter.h" |
#include "ipc/ipc_test_sink.h" |
@@ -195,9 +196,10 @@ TEST_F(ServiceWorkerDispatcherTest, |
// Set up ServiceWorkerProviderContext for ServiceWorkerGlobalScope. |
const int kProviderId = 10; |
scoped_refptr<ServiceWorkerProviderContext> provider_context( |
- new ServiceWorkerProviderContext(kProviderId, |
- SERVICE_WORKER_PROVIDER_FOR_CONTROLLER, |
- thread_safe_sender())); |
+ new ServiceWorkerProviderContext( |
+ kProviderId, SERVICE_WORKER_PROVIDER_FOR_CONTROLLER, |
+ mojom::ServiceWorkerProviderAssociatedRequest(), |
+ thread_safe_sender())); |
// The passed references should be adopted and owned by the provider context. |
OnAssociateRegistration(kDocumentMainThreadId, kProviderId, info, attrs); |
@@ -228,9 +230,10 @@ TEST_F(ServiceWorkerDispatcherTest, |
// Set up ServiceWorkerProviderContext for a document context. |
const int kProviderId = 10; |
scoped_refptr<ServiceWorkerProviderContext> provider_context( |
- new ServiceWorkerProviderContext(kProviderId, |
- SERVICE_WORKER_PROVIDER_FOR_WINDOW, |
- thread_safe_sender())); |
+ new ServiceWorkerProviderContext( |
+ kProviderId, SERVICE_WORKER_PROVIDER_FOR_WINDOW, |
+ mojom::ServiceWorkerProviderAssociatedRequest(), |
+ thread_safe_sender())); |
// The passed references should be adopted and only the registration reference |
// should be owned by the provider context. |
@@ -277,9 +280,10 @@ TEST_F(ServiceWorkerDispatcherTest, OnSetControllerServiceWorker) { |
// the provider, the passed referecence should be adopted and owned by the |
// provider context. |
scoped_refptr<ServiceWorkerProviderContext> provider_context( |
- new ServiceWorkerProviderContext(kProviderId, |
- SERVICE_WORKER_PROVIDER_FOR_WINDOW, |
- thread_safe_sender())); |
+ new ServiceWorkerProviderContext( |
+ kProviderId, SERVICE_WORKER_PROVIDER_FOR_WINDOW, |
+ mojom::ServiceWorkerProviderAssociatedRequest(), |
+ thread_safe_sender())); |
OnAssociateRegistration(kDocumentMainThreadId, kProviderId, info, attrs); |
ipc_sink()->ClearMessages(); |
OnSetControllerServiceWorker(kDocumentMainThreadId, kProviderId, attrs.active, |
@@ -326,7 +330,8 @@ TEST_F(ServiceWorkerDispatcherTest, OnSetControllerServiceWorker) { |
// provider client and immediately released due to limitation of the mock |
// implementation. |
provider_context = new ServiceWorkerProviderContext( |
- kProviderId, SERVICE_WORKER_PROVIDER_FOR_WINDOW, thread_safe_sender()); |
+ kProviderId, SERVICE_WORKER_PROVIDER_FOR_WINDOW, |
+ mojom::ServiceWorkerProviderAssociatedRequest(), thread_safe_sender()); |
OnAssociateRegistration(kDocumentMainThreadId, kProviderId, info, attrs); |
provider_client.reset( |
new MockWebServiceWorkerProviderClientImpl(kProviderId, dispatcher())); |
@@ -356,9 +361,10 @@ TEST_F(ServiceWorkerDispatcherTest, OnSetControllerServiceWorker_Null) { |
std::unique_ptr<MockWebServiceWorkerProviderClientImpl> provider_client( |
new MockWebServiceWorkerProviderClientImpl(kProviderId, dispatcher())); |
scoped_refptr<ServiceWorkerProviderContext> provider_context( |
- new ServiceWorkerProviderContext(kProviderId, |
- SERVICE_WORKER_PROVIDER_FOR_WINDOW, |
- thread_safe_sender())); |
+ new ServiceWorkerProviderContext( |
+ kProviderId, SERVICE_WORKER_PROVIDER_FOR_WINDOW, |
+ mojom::ServiceWorkerProviderAssociatedRequest(), |
+ thread_safe_sender())); |
OnAssociateRegistration(kDocumentMainThreadId, kProviderId, info, attrs); |