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

Unified Diff: content/renderer/presentation/presentation_connection_proxy_unittest.cc

Issue 2706463002: [Presentation API] Mojo typemap for content::PresentationConnectionMessage (Closed)
Patch Set: Fix compile error after rebase Created 3 years, 10 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/presentation_connection_proxy_unittest.cc
diff --git a/content/renderer/presentation/presentation_connection_proxy_unittest.cc b/content/renderer/presentation/presentation_connection_proxy_unittest.cc
index 159becffc3604a9f34c798b79e0ddbf132caca14..f864bc98e83142fb8184e8d607d0b44c3a59f6b7 100644
--- a/content/renderer/presentation/presentation_connection_proxy_unittest.cc
+++ b/content/renderer/presentation/presentation_connection_proxy_unittest.cc
@@ -71,15 +71,10 @@ class PresentationConnectionProxyTest : public ::testing::Test {
TEST_F(PresentationConnectionProxyTest, TestSendString) {
blink::WebString message = blink::WebString::fromUTF8("test message");
- blink::mojom::ConnectionMessagePtr session_message =
- blink::mojom::ConnectionMessage::New();
- session_message->type = blink::mojom::PresentationMessageType::TEXT;
- session_message->message = message.utf8();
-
base::RunLoop run_loop;
EXPECT_CALL(*receiver_connection_, didReceiveTextMessage(message));
controller_connection_proxy_->SendConnectionMessage(
- std::move(session_message),
+ PresentationConnectionMessage(message.utf8()),
base::Bind(
&PresentationConnectionProxyTest::ExpectSendConnectionMessageCallback,
base::Unretained(this)));
@@ -91,11 +86,6 @@ TEST_F(PresentationConnectionProxyTest, TestSendArrayBuffer) {
expected_data.push_back(42);
expected_data.push_back(36);
- blink::mojom::ConnectionMessagePtr session_message =
- blink::mojom::ConnectionMessage::New();
- session_message->type = blink::mojom::PresentationMessageType::BINARY;
- session_message->data = expected_data;
-
base::RunLoop run_loop;
EXPECT_CALL(*receiver_connection_, didReceiveBinaryMessage(_, _))
.WillOnce(::testing::Invoke(
@@ -105,7 +95,7 @@ TEST_F(PresentationConnectionProxyTest, TestSendArrayBuffer) {
}));
controller_connection_proxy_->SendConnectionMessage(
- std::move(session_message),
+ PresentationConnectionMessage(expected_data),
base::Bind(
&PresentationConnectionProxyTest::ExpectSendConnectionMessageCallback,
base::Unretained(this)));

Powered by Google App Engine
This is Rietveld 408576698