| Index: third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp
|
| diff --git a/third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp b/third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp
|
| index db0cb6e95dfff5d2cd71fed30bebb5004c1015d9..2b18dde20424084722aa9d67ec6f87fa76447962 100644
|
| --- a/third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp
|
| +++ b/third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp
|
| @@ -8,10 +8,12 @@
|
| #include "bindings/core/v8/V8BindingForTesting.h"
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/testing/DummyPageHolder.h"
|
| +#include "modules/presentation/PresentationConnection.h"
|
| #include "modules/presentation/PresentationConnectionList.h"
|
| #include "platform/testing/URLTestHelpers.h"
|
| #include "public/platform/modules/presentation/WebPresentationClient.h"
|
| #include "public/platform/modules/presentation/WebPresentationConnectionClient.h"
|
| +#include "public/platform/modules/presentation/WebPresentationConnectionProxy.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include <v8.h>
|
| @@ -80,6 +82,16 @@ class MockWebPresentationClient : public WebPresentationClient {
|
| MOCK_METHOD1(setDefaultPresentationUrls, void(const WebVector<WebURL>&));
|
| };
|
|
|
| +class MockWebPresentationConnectionProxy
|
| + : public WebPresentationConnectionProxy {
|
| + public:
|
| + MOCK_METHOD1(SetConnection, void(blink::WebPresentationConnection*));
|
| +
|
| + MOCK_METHOD1(SendString, void(const blink::WebString& message));
|
| +
|
| + MOCK_METHOD2(SendArrayBuffer, void(const uint8_t* data, size_t length));
|
| +};
|
| +
|
| class TestWebPresentationConnectionClient
|
| : public WebPresentationConnectionClient {
|
| public:
|
| @@ -87,6 +99,9 @@ class TestWebPresentationConnectionClient
|
| WebURL getUrl() override {
|
| return URLTestHelpers::toKURL("http://www.example.com");
|
| }
|
| + WebPresentationConnectionProxy* getOrCreateProxy() override {
|
| + return new MockWebPresentationConnectionProxy();
|
| + }
|
| };
|
|
|
| class PresentationReceiverTest : public ::testing::Test {
|
|
|