Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1813)

Unified Diff: content/renderer/presentation/test_presentation_connection.h

Issue 2471263003: [Presentation API] (4th)(1-UA blink side) Add WebPresentationConnection and WebPresentationConnecti… (Closed)
Patch Set: resolve code review comments from mlamouri Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/presentation/test_presentation_connection.h
diff --git a/content/renderer/presentation/test_presentation_connection.h b/content/renderer/presentation/test_presentation_connection.h
new file mode 100644
index 0000000000000000000000000000000000000000..16ba3cdd1517b275754580fdfd80f59e80b03dab
--- /dev/null
+++ b/content/renderer/presentation/test_presentation_connection.h
@@ -0,0 +1,34 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_TEST_HELPER_H_
+#define CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_TEST_HELPER_H_
+
+#include <memory>
+
+#include "testing/gmock/include/gmock/gmock.h"
+#include "third_party/WebKit/public/platform/modules/presentation/WebPresentationConnection.h"
+
+namespace content {
+
+class TestPresentationConnection : public blink::WebPresentationConnection {
+ public:
+ TestPresentationConnection();
+ ~TestPresentationConnection();
+
+ void bindProxy(
+ std::unique_ptr<blink::WebPresentationConnectionProxy> proxy) override;
+
+ MOCK_METHOD1(didReceiveTextMessage, void(const blink::WebString& message));
+ MOCK_METHOD2(didReceiveBinaryMessage,
+ void(const uint8_t* data, size_t length));
+ MOCK_METHOD1(didChangeState, void(blink::WebPresentationConnectionState));
+
+ private:
+ std::unique_ptr<blink::WebPresentationConnectionProxy> proxy_;
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_TEST_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698