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

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

Issue 133533007: Mojo: Move PlatformChannelPair to its own files. (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
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 15 matching lines...) Expand all
26 #include "base/rand_util.h" 26 #include "base/rand_util.h"
27 #include "base/synchronization/lock.h" 27 #include "base/synchronization/lock.h"
28 #include "base/synchronization/waitable_event.h" 28 #include "base/synchronization/waitable_event.h"
29 #include "base/threading/platform_thread.h" // For |Sleep()|. 29 #include "base/threading/platform_thread.h" // For |Sleep()|.
30 #include "base/threading/simple_thread.h" 30 #include "base/threading/simple_thread.h"
31 #include "base/threading/thread.h" 31 #include "base/threading/thread.h"
32 #include "base/time/time.h" 32 #include "base/time/time.h"
33 #include "mojo/system/message_in_transit.h" 33 #include "mojo/system/message_in_transit.h"
34 #include "mojo/system/platform_channel.h" 34 #include "mojo/system/platform_channel.h"
35 #include "mojo/system/platform_channel_handle.h" 35 #include "mojo/system/platform_channel_handle.h"
36 #include "mojo/system/platform_channel_pair.h"
36 #include "mojo/system/test_utils.h" 37 #include "mojo/system/test_utils.h"
37 #include "testing/gtest/include/gtest/gtest.h" 38 #include "testing/gtest/include/gtest/gtest.h"
38 39
39 namespace mojo { 40 namespace mojo {
40 namespace system { 41 namespace system {
41 namespace { 42 namespace {
42 43
43 MessageInTransit* MakeTestMessage(uint32_t num_bytes) { 44 MessageInTransit* MakeTestMessage(uint32_t num_bytes) {
44 std::vector<unsigned char> bytes(num_bytes, 0); 45 std::vector<unsigned char> bytes(num_bytes, 0);
45 for (size_t i = 0; i < num_bytes; i++) 46 for (size_t i = 0; i < num_bytes; i++)
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 FROM_HERE, 561 FROM_HERE,
561 base::Bind(&RawChannel::Shutdown, 562 base::Bind(&RawChannel::Shutdown,
562 base::Unretained(rc.get()))); 563 base::Unretained(rc.get())));
563 564
564 EXPECT_FALSE(rc->WriteMessage(MakeTestMessage(1))); 565 EXPECT_FALSE(rc->WriteMessage(MakeTestMessage(1)));
565 } 566 }
566 567
567 } // namespace 568 } // namespace
568 } // namespace system 569 } // namespace system
569 } // namespace mojo 570 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/system/platform_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