| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_TEST_HELPER_H_ | 5 #ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_TEST_HELPER_H_ |
| 6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_TEST_HELPER_H_ | 6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_TEST_HELPER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| 11 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nConnection.h" | 11 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nConnection.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 class TestPresentationConnection : public blink::WebPresentationConnection { | 15 class TestPresentationConnection : public blink::WebPresentationConnection { |
| 16 public: | 16 public: |
| 17 TestPresentationConnection(); | 17 TestPresentationConnection(); |
| 18 ~TestPresentationConnection(); | 18 ~TestPresentationConnection(); |
| 19 | 19 |
| 20 void bindProxy( | 20 void bindProxy( |
| 21 std::unique_ptr<blink::WebPresentationConnectionProxy> proxy) override; | 21 std::unique_ptr<blink::WebPresentationConnectionProxy> proxy) override; |
| 22 | 22 |
| 23 MOCK_METHOD1(didReceiveTextMessage, void(const blink::WebString& message)); | 23 MOCK_METHOD1(didReceiveTextMessage, void(const blink::WebString& message)); |
| 24 MOCK_METHOD2(didReceiveBinaryMessage, | 24 MOCK_METHOD2(didReceiveBinaryMessage, |
| 25 void(const uint8_t* data, size_t length)); | 25 void(const uint8_t* data, size_t length)); |
| 26 MOCK_METHOD1(didChangeState, void(blink::WebPresentationConnectionState)); | 26 MOCK_METHOD1(didChangeState, void(blink::WebPresentationConnectionState)); |
| 27 MOCK_METHOD0(didClose, void()); |
| 27 | 28 |
| 28 blink::WebPresentationConnectionProxy* proxy(); | 29 blink::WebPresentationConnectionProxy* proxy(); |
| 29 | 30 |
| 30 private: | 31 private: |
| 31 std::unique_ptr<blink::WebPresentationConnectionProxy> proxy_; | 32 std::unique_ptr<blink::WebPresentationConnectionProxy> proxy_; |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 } // namespace content | 35 } // namespace content |
| 35 | 36 |
| 36 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_TEST_HELPER_H_ | 37 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_TEST_HELPER_H_ |
| OLD | NEW |