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

Unified Diff: mojo/public/cpp/bindings/tests/handle_passing_unittest.cc

Issue 328713004: Mojo: Use the MessagePipe creation helper whenever possible/reasonable in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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: mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc b/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
index 7f886b69f5f2e7282bc7a55ae805fa0b8bfeeb8c..f9968520e80096d43e1ae6bdb5411cf5e0309867 100644
--- a/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
@@ -176,20 +176,16 @@ TEST_F(HandlePassingTest, Basic) {
factory.set_client(&factory_client);
- ScopedMessagePipeHandle pipe0, pipe1;
- CreateMessagePipe(&pipe0, &pipe1);
+ MessagePipe pipe0;
+ EXPECT_TRUE(WriteTextMessage(pipe0.handle1.get(), kText1));
- EXPECT_TRUE(WriteTextMessage(pipe1.get(), kText1));
-
- ScopedMessagePipeHandle pipe2, pipe3;
- CreateMessagePipe(&pipe2, &pipe3);
-
- EXPECT_TRUE(WriteTextMessage(pipe3.get(), kText2));
+ MessagePipe pipe1;
+ EXPECT_TRUE(WriteTextMessage(pipe1.handle1.get(), kText2));
sample::RequestPtr request(sample::Request::New());
request->x = 1;
- request->pipe = pipe2.Pass();
- factory->DoStuff(request.Pass(), pipe0.Pass());
+ request->pipe = pipe1.handle0.Pass();
+ factory->DoStuff(request.Pass(), pipe0.handle0.Pass());
EXPECT_FALSE(factory_client.got_response());
« no previous file with comments | « mojo/public/cpp/bindings/tests/connector_unittest.cc ('k') | mojo/public/cpp/bindings/tests/sample_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698