| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "public/web/WebEmbeddedWorker.h" | 5 #include "public/web/WebEmbeddedWorker.h" |
| 6 | 6 |
| 7 #include "platform/testing/URLTestHelpers.h" | 7 #include "platform/testing/URLTestHelpers.h" |
| 8 #include "platform/testing/UnitTestHelpers.h" | 8 #include "platform/testing/UnitTestHelpers.h" |
| 9 #include "public/platform/Platform.h" | 9 #include "public/platform/Platform.h" |
| 10 #include "public/platform/WebURLLoaderMockFactory.h" | 10 #include "public/platform/WebURLLoaderMockFactory.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 void getClient(const WebString&, WebServiceWorkerClientCallbacks*) override
{ NOTREACHED(); } | 46 void getClient(const WebString&, WebServiceWorkerClientCallbacks*) override
{ NOTREACHED(); } |
| 47 void getClients(const WebServiceWorkerClientQueryOptions&, WebServiceWorkerC
lientsCallbacks*) override { NOTREACHED(); } | 47 void getClients(const WebServiceWorkerClientQueryOptions&, WebServiceWorkerC
lientsCallbacks*) override { NOTREACHED(); } |
| 48 void openWindow(const WebURL&, WebServiceWorkerClientCallbacks*) override {
NOTREACHED(); } | 48 void openWindow(const WebURL&, WebServiceWorkerClientCallbacks*) override {
NOTREACHED(); } |
| 49 void postMessageToClient(const WebString& uuid, const WebString&, WebMessage
PortChannelArray*) override { NOTREACHED(); } | 49 void postMessageToClient(const WebString& uuid, const WebString&, WebMessage
PortChannelArray*) override { NOTREACHED(); } |
| 50 void postMessageToCrossOriginClient(const WebCrossOriginServiceWorkerClient&
, const WebString&, WebMessagePortChannelArray*) override { NOTREACHED(); } | 50 void postMessageToCrossOriginClient(const WebCrossOriginServiceWorkerClient&
, const WebString&, WebMessagePortChannelArray*) override { NOTREACHED(); } |
| 51 void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) override { NOTREACHE
D(); } | 51 void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) override { NOTREACHE
D(); } |
| 52 void claim(WebServiceWorkerClientsClaimCallbacks*) override { NOTREACHED();
} | 52 void claim(WebServiceWorkerClientsClaimCallbacks*) override { NOTREACHED();
} |
| 53 void focus(const WebString& uuid, WebServiceWorkerClientCallbacks*) override
{ NOTREACHED(); } | 53 void focus(const WebString& uuid, WebServiceWorkerClientCallbacks*) override
{ NOTREACHED(); } |
| 54 void navigate(const WebString& uuid, const WebURL&, WebServiceWorkerClientCa
llbacks*) override { NOTREACHED(); } | 54 void navigate(const WebString& uuid, const WebURL&, WebServiceWorkerClientCa
llbacks*) override { NOTREACHED(); } |
| 55 void registerForeignFetchScopes(const WebVector<WebURL>& subScopes, const We
bVector<WebSecurityOrigin>& origins) override { NOTREACHED(); } | 55 void registerForeignFetchScopes(const WebVector<WebURL>& subScopes, const We
bVector<WebSecurityOrigin>& origins) override { NOTREACHED(); } |
| 56 ServiceRegistry* serviceRegistry() override |
| 57 { |
| 58 NOTREACHED(); |
| 59 return nullptr; |
| 60 } |
| 56 | 61 |
| 57 private: | 62 private: |
| 58 bool m_hasAssociatedRegistration; | 63 bool m_hasAssociatedRegistration; |
| 59 }; | 64 }; |
| 60 | 65 |
| 61 class WebEmbeddedWorkerImplTest : public ::testing::Test { | 66 class WebEmbeddedWorkerImplTest : public ::testing::Test { |
| 62 protected: | 67 protected: |
| 63 void SetUp() override | 68 void SetUp() override |
| 64 { | 69 { |
| 65 m_mockClient = new MockServiceWorkerContextClient(); | 70 m_mockClient = new MockServiceWorkerContextClient(); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 ::testing::Mock::VerifyAndClearExpectations(m_mockClient); | 286 ::testing::Mock::VerifyAndClearExpectations(m_mockClient); |
| 282 | 287 |
| 283 // Resume after download. | 288 // Resume after download. |
| 284 EXPECT_CALL(*m_mockClient, createServiceWorkerProvider()) | 289 EXPECT_CALL(*m_mockClient, createServiceWorkerProvider()) |
| 285 .WillOnce(::testing::Return(nullptr)); | 290 .WillOnce(::testing::Return(nullptr)); |
| 286 m_worker->resumeAfterDownload(); | 291 m_worker->resumeAfterDownload(); |
| 287 ::testing::Mock::VerifyAndClearExpectations(m_mockClient); | 292 ::testing::Mock::VerifyAndClearExpectations(m_mockClient); |
| 288 } | 293 } |
| 289 | 294 |
| 290 } // namespace blink | 295 } // namespace blink |
| OLD | NEW |