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

Side by Side Diff: mojo/system/raw_channel_posix_unittest.cc

Issue 139823003: Mojo: Move system embedder API files to mojo/system/embedder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « mojo/system/raw_channel_posix.cc ('k') | mojo/system/remote_message_pipe_posix_unittest.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // TODO(vtl): Factor out the remaining POSIX-specific bits of this test (once we 5 // TODO(vtl): Factor out the remaining POSIX-specific bits of this test (once we
6 // have a non-POSIX implementation). 6 // have a non-POSIX implementation).
7 7
8 #include "mojo/system/raw_channel.h" 8 #include "mojo/system/raw_channel.h"
9 9
10 #include <fcntl.h> 10 #include <fcntl.h>
(...skipping 10 matching lines...) Expand all
21 #include "base/memory/scoped_ptr.h" 21 #include "base/memory/scoped_ptr.h"
22 #include "base/memory/scoped_vector.h" 22 #include "base/memory/scoped_vector.h"
23 #include "base/message_loop/message_loop.h" 23 #include "base/message_loop/message_loop.h"
24 #include "base/posix/eintr_wrapper.h" 24 #include "base/posix/eintr_wrapper.h"
25 #include "base/rand_util.h" 25 #include "base/rand_util.h"
26 #include "base/synchronization/lock.h" 26 #include "base/synchronization/lock.h"
27 #include "base/synchronization/waitable_event.h" 27 #include "base/synchronization/waitable_event.h"
28 #include "base/threading/platform_thread.h" // For |Sleep()|. 28 #include "base/threading/platform_thread.h" // For |Sleep()|.
29 #include "base/threading/simple_thread.h" 29 #include "base/threading/simple_thread.h"
30 #include "base/time/time.h" 30 #include "base/time/time.h"
31 #include "mojo/system/embedder/platform_channel_pair.h"
32 #include "mojo/system/embedder/platform_handle.h"
33 #include "mojo/system/embedder/scoped_platform_handle.h"
31 #include "mojo/system/message_in_transit.h" 34 #include "mojo/system/message_in_transit.h"
32 #include "mojo/system/platform_channel_pair.h"
33 #include "mojo/system/platform_handle.h"
34 #include "mojo/system/scoped_platform_handle.h"
35 #include "mojo/system/test_utils.h" 35 #include "mojo/system/test_utils.h"
36 36
37 namespace mojo { 37 namespace mojo {
38 namespace system { 38 namespace system {
39 namespace { 39 namespace {
40 40
41 MessageInTransit* MakeTestMessage(uint32_t num_bytes) { 41 MessageInTransit* MakeTestMessage(uint32_t num_bytes) {
42 std::vector<unsigned char> bytes(num_bytes, 0); 42 std::vector<unsigned char> bytes(num_bytes, 0);
43 for (size_t i = 0; i < num_bytes; i++) 43 for (size_t i = 0; i < num_bytes; i++)
44 bytes[i] = static_cast<unsigned char>(i + num_bytes); 44 bytes[i] = static_cast<unsigned char>(i + num_bytes);
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 FROM_HERE, 521 FROM_HERE,
522 base::Bind(&RawChannel::Shutdown, 522 base::Bind(&RawChannel::Shutdown,
523 base::Unretained(rc.get()))); 523 base::Unretained(rc.get())));
524 524
525 EXPECT_FALSE(rc->WriteMessage(MakeTestMessage(1))); 525 EXPECT_FALSE(rc->WriteMessage(MakeTestMessage(1)));
526 } 526 }
527 527
528 } // namespace 528 } // namespace
529 } // namespace system 529 } // namespace system
530 } // namespace mojo 530 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/system/raw_channel_posix.cc ('k') | mojo/system/remote_message_pipe_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698