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