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

Side by Side Diff: mojo/edk/system/remote_message_pipe_unittest.cc

Issue 830593003: Update mojo sdk to rev 9fbbc4f0fef1187312316c0ed992342474e139f1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cherry-pick mojo 9d3b8dd17f12d20035a14737fdc38dd926890ff8 Created 5 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 unified diff | Download patch
« no previous file with comments | « mojo/edk/system/raw_channel_unittest.cc ('k') | mojo/edk/system/test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include <stdint.h> 5 #include <stdint.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 HandleSignalsState hss; 1033 HandleSignalsState hss;
1034 1034
1035 scoped_refptr<ChannelEndpoint> ep0; 1035 scoped_refptr<ChannelEndpoint> ep0;
1036 scoped_refptr<MessagePipe> mp0(MessagePipe::CreateLocalProxy(&ep0)); 1036 scoped_refptr<MessagePipe> mp0(MessagePipe::CreateLocalProxy(&ep0));
1037 scoped_refptr<ChannelEndpoint> ep1; 1037 scoped_refptr<ChannelEndpoint> ep1;
1038 scoped_refptr<MessagePipe> mp1(MessagePipe::CreateProxyLocal(&ep1)); 1038 scoped_refptr<MessagePipe> mp1(MessagePipe::CreateProxyLocal(&ep1));
1039 BootstrapChannelEndpoints(ep0, ep1); 1039 BootstrapChannelEndpoints(ep0, ep1);
1040 1040
1041 base::FilePath unused; 1041 base::FilePath unused;
1042 base::ScopedFILE fp( 1042 base::ScopedFILE fp(
1043 CreateAndOpenTemporaryFileInDir(temp_dir.path(), &unused)); 1043 base::CreateAndOpenTemporaryFileInDir(temp_dir.path(), &unused));
1044 EXPECT_EQ(sizeof(kHello), fwrite(kHello, 1, sizeof(kHello), fp.get())); 1044 EXPECT_EQ(sizeof(kHello), fwrite(kHello, 1, sizeof(kHello), fp.get()));
1045 // We'll try to pass this dispatcher, which will cause a |PlatformHandle| to 1045 // We'll try to pass this dispatcher, which will cause a |PlatformHandle| to
1046 // be passed. 1046 // be passed.
1047 scoped_refptr<PlatformHandleDispatcher> dispatcher( 1047 scoped_refptr<PlatformHandleDispatcher> dispatcher(
1048 new PlatformHandleDispatcher( 1048 new PlatformHandleDispatcher(
1049 mojo::test::PlatformHandleFromFILE(fp.Pass()))); 1049 mojo::test::PlatformHandleFromFILE(fp.Pass())));
1050 1050
1051 // Prepare to wait on MP 1, port 1. (Add the waiter now. Otherwise, if we do 1051 // Prepare to wait on MP 1, port 1. (Add the waiter now. Otherwise, if we do
1052 // it later, it might already be readable.) 1052 // it later, it might already be readable.)
1053 waiter.Init(); 1053 waiter.Init();
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 mp0->Close(0); 1367 mp0->Close(0);
1368 mp1->Close(1); 1368 mp1->Close(1);
1369 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close()); 1369 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close());
1370 // Note that |local_mp|'s port 0 belong to |dispatcher|, which was closed. 1370 // Note that |local_mp|'s port 0 belong to |dispatcher|, which was closed.
1371 local_mp->Close(1); 1371 local_mp->Close(1);
1372 } 1372 }
1373 1373
1374 } // namespace 1374 } // namespace
1375 } // namespace system 1375 } // namespace system
1376 } // namespace mojo 1376 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/raw_channel_unittest.cc ('k') | mojo/edk/system/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698